CVS: theedge/sbin lget,1.23,1.24

elaine at lunar-linux.org elaine at lunar-linux.org
Wed Sep 17 00:36:43 GMT 2003


Update of /var/cvs/lunar/theedge/sbin
In directory dbguin.lunar-linux.org:/tmp/cvs-serv13321/sbin

Modified Files:
	lget 
Log Message:
lget - added -V |--Version syntax luv corrected 'versions' command oper.


Index: lget
===================================================================
RCS file: /var/cvs/lunar/theedge/sbin/lget,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- lget	7 Aug 2003 05:56:48 -0000	1.23
+++ lget	17 Sep 2003 00:36:41 -0000	1.24
@@ -46,6 +46,7 @@
    -h | --help                  Displays this help text
    -u | --url     URL           Specify an alternate download URL
    -v | --verbose               Increases the level of message output
+   -V | --Version               Select specific Version of module to install
 EOF
 
   exit  1
@@ -58,6 +59,16 @@
   
   MODULES="$@"
 
+  if [ -n "$MOD_VERSION" ] ; then
+    if  [ $(echo $MODULES | wc -w) -gt 1 ] ; then
+      message "${MESSAGE_COLOR} -V|--Version only allowed for single-module install!${DEFAULT_COLOR}"
+      exit 1
+    else
+      MODULES="$MODULES/$MOD_VERSION"
+      message "module = $MODULES"
+    fi
+  fi
+
   if [ -z "$MODULES" ] ; then
     verbose_msg "downloading entire moonbase"
     MODULES=$(list_moonbase | sort)
@@ -86,7 +97,7 @@
 
 . /etc/lunar/config
 
-GETOPT_ARGS=$(getopt -q -n lget -o "df:hu:v" -l "debug,from:,help,url:,verbose" -- "$@")
+GETOPT_ARGS=$(getopt -q -n lget -o "df:hu:vV:" -l "debug,from:,help,url:,verbose,Version:" -- "$@")
 
 if [ -z "$?" ] ; then
   help | view_file
@@ -104,6 +115,8 @@
       -h|--help    ) help ;                                     exit  1 ;;
       -u|--url     ) export BASE_URL="$2" ;                     shift 2 ;;
       -v|--verbose ) export VERBOSE="on" ;                      shift   ;;
+      -V|--Version ) export MOD_VERSION=$2 ;                    shift 2 ;;
+
       --) shift ; break ;;
       *) help ; exit ;;
     esac




More information about the Lunar-commits mailing list