* libupdate.sh: do the shift before the assignments
authorTom Yu <tlyu@mit.edu>
Mon, 20 May 1996 05:17:15 +0000 (05:17 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 20 May 1996 05:17:15 +0000 (05:17 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8055 dc483132-0cff-0310-8789-dd5450dbe970

src/util/libupdate.sh

index 8ef8683313dcaaff1d80a04a2ce222ab34b5f232..593335b46d4ab987f6850d2f08e7aba7f5b55bec 100644 (file)
@@ -8,20 +8,21 @@
 ARADD="@ARADD@"
 ARCHIVE="@ARCHIVE@"
 
-library=$1
-oblist=$2
-dir=$3
-
-force=
-rmcmd=
-arcmd="$ARADD"
-if test "$1" = "--force" 
-then
+case "$1" in
+--force)
        force=yes
        arcmd="$ARCHIVE"
-       rmcmd="rm -f $library"
        shift
-fi
+       rmcmd="rm -f $1"
+       ;;
+*)
+       arcmd="$ARADD"
+       rmcmd=
+       force=
+esac
+library=$1
+oblist=$2
+dir=$3
 
 stamp=`echo $library | sed -e 's/.a$/.stamp/'`
 
@@ -37,10 +38,3 @@ echo "Updating library $library from $oblist"
 $rmcmd
 $arcmd $library `cat $oblist | \
                sed -e "s;^\([^ ]*\);$dir/\1;g" -e "s; \([^ ]*\); $dir/\1;g"`
-
-
-
-
-
-
-