Skip to content

Commit c78e186

Browse files
author
Eric Crosson
committed
Satisfy shellcheck
1 parent ca1ad39 commit c78e186

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bin/clone

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
readonly template=$(mktemp -d /tmp/post-clone.XXXXX)
99

1010
teardown() {
11-
rm -rf ${template}
11+
rm -rf "${template}"
1212
}
1313
trap teardown EXIT
1414

1515
init() {
16-
cd ${template}
16+
cd "${template}"
1717
git init
1818
git remote add origin https://github.com/git-hook/post-clone.git
1919
git fetch origin
@@ -22,7 +22,7 @@ init() {
2222
}
2323

2424
main() {
25-
git clone --template=${template} "$@"
25+
git clone --template="${template}" "$@"
2626
}
2727

2828
init &>/dev/null

hooks/post-checkout

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
readonly repo=$(git rev-parse --show-toplevel)
1111

1212
main() {
13-
rm -rf -- ${repo}/.git/hooks
13+
rm -rf -- "${repo}/.git/hooks"
1414
installClonedReposHooks
1515
invokeClonedReposPostCloneHook
1616
}
1717

1818
installClonedReposHooks() {
19-
cd ${repo}/.git
19+
cd "${repo}/.git"
2020
rm -rf hooks
2121
ln -sf ../hooks
2222
cd - >/dev/null
2323
}
2424

2525
invokeClonedReposPostCloneHook() {
2626
local -r post_clone_hook=${repo}/.git/hooks/post-clone
27-
test ! -e ${post_clone_hook} && return
28-
chmod u+x ${post_clone_hook}
27+
test ! -e "${post_clone_hook}" && return
28+
chmod u+x "${post_clone_hook}"
2929
${post_clone_hook}
3030
}
3131

0 commit comments

Comments
 (0)