commit 4cf70435b27fbe16a539e4d39ae0c745941f4d1c
parent f3770761748b454222b1a0d8c3a94ec8b5ecae63
Author: Thien-Thi Nguyen <ttn@gnuvola.org>
Date: Thu, 30 Jun 2022 03:34:54 -0400
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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/contrib/gana-update.sh b/contrib/gana-update.sh
@@ -22,6 +22,7 @@ ensure ()
if ! diff $src $dst > /dev/null
then
+ test ! -f $dst || chmod +w $dst
cp $src $dst
chmod -w $dst
fi