diff options
Diffstat (limited to 'contrib/gana-update.sh')
-rwxr-xr-x | contrib/gana-update.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/gana-update.sh b/contrib/gana-update.sh index 121980273..b20bbaa1d 100755 --- a/contrib/gana-update.sh +++ b/contrib/gana-update.sh @@ -17,13 +17,14 @@ ensure () # $2 -- src dir under contrib/ # $3 -- dst dir under ./ fn="$1" - src="contrib/$2" - dst="./$3" + src="contrib/$2/$fn" + dst="./$3/$fn" - if ! diff $src/$fn $dst/$fn > /dev/null + if ! diff $src $dst > /dev/null then - cp $src/$fn $dst/$fn - chmod -w $dst/$fn + test ! -f $dst || chmod +w $dst + cp $src $dst + chmod -w $dst fi } |