From: Tom Yu Date: Mon, 20 May 1996 15:20:34 +0000 (+0000) Subject: fix libupdate and allow it to deal with multiple directories X-Git-Tag: krb5-1.0-beta6~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c574744a6cdaba1b90e6449275bff1ca89c0ab1a;p=krb5.git fix libupdate and allow it to deal with multiple directories git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8059 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 72ac96243..8540d06a5 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,7 @@ +Mon May 20 11:05:49 1996 Tom Yu + + * libupdate.sh: allow to deal with multiple directories at once + Sun May 19 23:53:21 1996 Tom Yu * libupdate.sh: do the shift before the assignments diff --git a/src/util/libupdate.sh b/src/util/libupdate.sh index 593335b46..fe0dab8e9 100644 --- a/src/util/libupdate.sh +++ b/src/util/libupdate.sh @@ -2,7 +2,7 @@ # # libupdate: Update a library based on a file of object files. # -# Usage: libupdate +# Usage: libupdate # ARADD="@ARADD@" @@ -22,19 +22,23 @@ case "$1" in esac library=$1 oblist=$2 -dir=$3 +shift +shift +for dir do + oblists="$oblists${oblists+ }$dir/$oblist" +done stamp=`echo $library | sed -e 's/.a$/.stamp/'` if test "$force" != yes -a -f $stamp && \ - ls -lt $stamp $oblist | sed 1q | grep $stamp$ > /dev/null || \ - test -z "`cat $oblist`" + ls -lt $stamp $oblists | sed 1q | grep $stamp$ > /dev/null || \ + test -z "`cat $oblists`" then exit 0 fi -echo "Updating library $library from $oblist" +echo "Updating library $library from $oblists" $rmcmd -$arcmd $library `cat $oblist | \ - sed -e "s;^\([^ ]*\);$dir/\1;g" -e "s; \([^ ]*\); $dir/\1;g"` +$arcmd $library `for dir do (cd $dir; cat $oblist | \ + sed -e "s;^\([^ ]*\);$dir/\1;g" -e "s; \([^ ]*\); $dir/\1;g") done`