1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/gnu/usr.bin/groff/gendef.sh

25 lines
238 B
Bash
Raw Normal View History

1995-01-15 08:10:00 +00:00
# gendef filename var=val var=val
file=$1
shift
defs="#define $1"
shift
for def
do
defs="$defs
#define $def"
done
t=/tmp/groff.$$
sed -e 's/=/ /' >$t <<EOF
$defs
EOF
test -r $file && cmp -s $t $file || cp $t $file
rm -f $t
exit 0