diff options
author | etheisen <etheisen@cvs.openbsd.org> | 1996-09-14 19:02:02 +0000 |
---|---|---|
committer | etheisen <etheisen@cvs.openbsd.org> | 1996-09-14 19:02:02 +0000 |
commit | 6a4f3d0fd940c1e7052ddf23907f0e297dc42f4b (patch) | |
tree | 712fd665d6b150ef04906975a7493d87d38a1a8a /gnu/usr.bin/groff/gendef.sh | |
parent | 9cf27152dae9dbf80b167732c78c47baee90ddc5 (diff) |
Third time because import sucks.
Diffstat (limited to 'gnu/usr.bin/groff/gendef.sh')
-rw-r--r-- | gnu/usr.bin/groff/gendef.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/usr.bin/groff/gendef.sh b/gnu/usr.bin/groff/gendef.sh new file mode 100644 index 00000000000..e2b2575ffbd --- /dev/null +++ b/gnu/usr.bin/groff/gendef.sh @@ -0,0 +1,24 @@ +# 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 |