Skip to content

Commit 4316d37

Browse files
committed
mark executable, quote wdir defensively
1 parent 39d0942 commit 4316d37

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

autogen.sh

100644100755
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
autoreconf --install
33

4-
wdir=$(dirname $(readlink -m $0))
4+
wdir=$(dirname $(readlink -m "$0"))
55
# if git prepare commit hook is a file, rename it to .orig
66
# and replace it with a link to the project hook
7-
if [ -f $wdir/.git/hooks/prepare-commit-msg ]; then
7+
if [ -f "$wdir/.git/hooks/prepare-commit-msg" ]; then
88
echo "installing git prepare-commit hook"
9-
mv -f $wdir/.git/hooks/prepare-commit-msg $wdir/.git/hooks/prepare-commit-msg.save || exit 1
10-
ln -s '../../scripts/git_prepare_hook' $wdir/.git/hooks/prepare-commit-msg || exit 1
9+
mv -f "$wdir/.git/hooks/prepare-commit-msg" "$wdir/.git/hooks/prepare-commit-msg.save" || exit 1
10+
ln -s '../../scripts/git_prepare_hook' "$wdir/.git/hooks/prepare-commit-msg" || exit 1
1111
fi

0 commit comments

Comments
 (0)