gendef.sh revision 18099
118099Spst# gendef filename var=val var=val 218099Spst 318099Spstfile=$1 418099Spstshift 518099Spst 618099Spstdefs="#define $1" 718099Spstshift 818099Spstfor def 918099Spstdo 1018099Spst defs="$defs 1118099Spst#define $def" 1218099Spstdone 1318099Spst 1418099Spstt=/tmp/groff.$$ 1518099Spst 1618099Spstsed -e 's/=/ /' >$t <<EOF 1718099Spst$defs 1818099SpstEOF 1918099Spst 2018099Spsttest -r $file && cmp -s $t $file || cp $t $file 2118099Spst 2218099Spstrm -f $t 2318099Spst 2418099Spstexit 0 25