mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 14:24:09 +01:00
25 lines
238 B
Bash
25 lines
238 B
Bash
# 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
|