+2003-07-08 Paul Eggert <eggert@twinsun.com>
+
+ * srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding the
+ use of GNU extensions. Change "x=`eval echo $x`" to the shorter
+ and sweeter "eval x=$x".
+ * srclist.txt: Get lib/argp* from glibc.
+
2003-07-06 <karl@gnu.org>
* depcomp: update from automake.
#!/bin/sh
-# $Id: srclist-update,v 1.5 2002-11-26 22:58:57 karl Exp $
+# $Id: srclist-update,v 1.6 2003-07-08 23:33:45 eggert Exp $
#
# Check for files in directory $1 being up to date, according to the
# list on stdin. Don't actually make any changes, just show the diffs.
#
fixfile() \
{
- if echo "$options" | grep -w gpl >/dev/null; then
- fixlicense $1
- else
- cat $1
- fi \
- | fgrep -v '$'"Id:" >$2
+ case " $options " in
+ *' gpl '*)
+ fixlicense $1;;
+ *)
+ cat $1;;
+ esac \
+ | grep -v '\$Id: srclist-update,v 1.6 2003-07-08 23:33:45 eggert Exp $' >$2
}
# \f
cat | while read src dst options; do
- test -z "$dst" && continue # skip lines without second element
- echo "$src $dst" | sed 's/#.*$//' | egrep '^\s*$' >/dev/null \
- && continue # skip whitespace and comment-only lines
+ case $src:$dst in
+ *: ) continue;; # skip lines without second element
+ '#'* ) continue;; # skip comment-only lines
+ esac
- src=`eval echo $src`
+ eval src=$src
if test ! -r $src; then
echo "$0: cannot read $src" >&2
continue
# Ignore subdirs in src dir. E.g., if input spec is
# src/subdir/foo.c dst
# write destination file dst/foo.c.
- dst=`eval echo $dst`
+ eval dst=$dst
test -d $dst && dst=$dst/`basename $src`
# Make changes for sake of comparison.
$verbose && echo "## $gplsrc $dst # unchanged"
else
echo "## $gplsrc $dst # changes"
- diff -c2 $dst $gplsrc
+ diff -C 2 $dst $gplsrc
fi
done