mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 04:33:25 +00:00
29 lines
402 B
Bash
29 lines
402 B
Bash
#!/bin/sh
|
|
|
|
prog=`basename $0`
|
|
|
|
|
|
t=/tmp/$prog.$$
|
|
|
|
trap 'rm -f ${t} ; exit 1' 1 3 15
|
|
|
|
while [ $# -gt 0 ]; do
|
|
f=$1
|
|
shift
|
|
sed -e '/^DEPS_MAGIC :=/,/^-include \$/s/^/#/' $f > $t
|
|
c="diff $f $t"
|
|
echo $c
|
|
$c
|
|
tstatus=$?
|
|
if [ $tstatus = 0 ]; then
|
|
echo "$prog":" $f not modified"
|
|
elif [ ! -w $f ]; then
|
|
echo "$prog":" $f not not writable"
|
|
else
|
|
c="cp $t $f"
|
|
echo $c
|
|
$c
|
|
fi
|
|
rm -f $t
|
|
done
|