5 # A simple caching method, used by the config file `cache' directive.
7 # Copyright (c) 2001 Frank Strauss, Technical University of Braunschweig.
9 # See the file "COPYING" for information on usage and redistribution
10 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 # $Id: smicache.in 8090 2008-04-18 12:56:29Z strauss $
14 # NOTE, that this script relies on wget and getopts
15 # (shell builtin like in bash or standalone).
17 # NOTE, that smicache has just been an experiment. It is NOT suggested
18 # to use it in a production environment.
24 prefix=http://www.ibr.cs.tu-bs.de/projects/libsmi/smicache/
30 echo "smicache $VERSION"
36 echo "Usage: smicache [-Vh] [-d dir] [-p prefix] mib"
37 echo "-V show version and license information"
38 echo "-h show usage information"
39 echo "-d dir use dir as the caching directory"
40 echo "-p prefix use prefix as the URL prefix for fetching modules"
41 echo "mib name of the module to be fetched"
47 $WGET -q -O "$dir/$1" "$prefix/$1"
52 while $GETOPTS Vhd:p: c ; do
70 shift `expr $OPTIND - 1`
74 if [ $# -eq 1 ] ; then