fix portability bug: make sure destination file is writeable
Some shells let this go w/o comment, some don't. Better to be sure. (ensure): If "$dst" exists, make sure it is writeable.
This commit is contained in:
parent
f377076174
commit
4cf70435b2
@ -22,6 +22,7 @@ ensure ()
|
|||||||
|
|
||||||
if ! diff $src $dst > /dev/null
|
if ! diff $src $dst > /dev/null
|
||||||
then
|
then
|
||||||
|
test ! -f $dst || chmod +w $dst
|
||||||
cp $src $dst
|
cp $src $dst
|
||||||
chmod -w $dst
|
chmod -w $dst
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user