gendef.sh revision 18099
1# gendef filename var=val var=val 2 3file=$1 4shift 5 6defs="#define $1" 7shift 8for def 9do 10 defs="$defs 11#define $def" 12done 13 14t=/tmp/groff.$$ 15 16sed -e 's/=/ /' >$t <<EOF 17$defs 18EOF 19 20test -r $file && cmp -s $t $file || cp $t $file 21 22rm -f $t 23 24exit 0 25