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:
Thien-Thi Nguyen 2022-06-30 03:34:54 -04:00
parent f377076174
commit 4cf70435b2
No known key found for this signature in database
GPG Key ID: 670322244C807502

View File

@ -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