summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ChangeLog3
-rw-r--r--src/util/libupdate.sh7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/util/ChangeLog b/src/util/ChangeLog
index 5239085a9..98c29551e 100644
--- a/src/util/ChangeLog
+++ b/src/util/ChangeLog
@@ -1,5 +1,8 @@
Tue Nov 1 14:49:00 1994 (tytso@rsx-11)
+ * libupdate.sh: Use library.stamp to determine whether or not
+ $arcmd needs to be rerun.
+
* libupdate.sh: touch the library first, before running $aradd, in
case changing the mod time of the library after running
$aradd causes problems on some systems.
diff --git a/src/util/libupdate.sh b/src/util/libupdate.sh
index b036a5892..c56775f01 100644
--- a/src/util/libupdate.sh
+++ b/src/util/libupdate.sh
@@ -21,8 +21,10 @@ library=$1
oblist=$2
dir=$3
-if test "$force" != yes -a -f $library && \
- ls -lt $library $oblist | sed 1q | grep $library$ > /dev/null || \
+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`"
then
exit 0
@@ -30,7 +32,6 @@ fi
echo "Updating library $library from $oblist"
-touch $library
$arcmd $library `cat $oblist | \
sed -e "s;^\([^ ]*\);$dir/\1;g" -e "s; \([^ ]*\); $dir/\1;g"`