aboutsummaryrefslogtreecommitdiff
path: root/contrib/gana-update.sh
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2022-06-30 03:32:29 -0400
committerThien-Thi Nguyen <ttn@gnuvola.org>2022-06-30 03:32:29 -0400
commitf3770761748b454222b1a0d8c3a94ec8b5ecae63 (patch)
treee80600789afce110d528887235572095da478f23 /contrib/gana-update.sh
parent2805018da25b07a36b1ab56e6fc990d72d86d70a (diff)
refactor slightly
(ensure): Don't repeat "$src/$fn" and "$dst/$fn"; instead, compute them once as "$src" and "$dst", respectively.
Diffstat (limited to 'contrib/gana-update.sh')
-rwxr-xr-xcontrib/gana-update.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/gana-update.sh b/contrib/gana-update.sh
index 121980273..e16c67413 100755
--- a/contrib/gana-update.sh
+++ b/contrib/gana-update.sh
@@ -17,13 +17,13 @@ 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
+ cp $src $dst
+ chmod -w $dst
fi
}