From 4cf70435b27fbe16a539e4d39ae0c745941f4d1c Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 30 Jun 2022 03:34:54 -0400 Subject: [PATCH] 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. --- contrib/gana-update.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gana-update.sh b/contrib/gana-update.sh index e16c67413..b20bbaa1d 100755 --- 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