File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 88readonly template=$( mktemp -d /tmp/post-clone.XXXXX)
99
1010teardown () {
11- rm -rf ${template}
11+ rm -rf " ${template} "
1212}
1313trap teardown EXIT
1414
1515init () {
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
2424main () {
25- git clone --template=${template} " $@ "
25+ git clone --template=" ${template} " " $@ "
2626}
2727
2828init & > /dev/null
Original file line number Diff line number Diff line change 1010readonly repo=$( git rev-parse --show-toplevel)
1111
1212main () {
13- rm -rf -- ${repo} /.git/hooks
13+ rm -rf -- " ${repo} /.git/hooks"
1414 installClonedReposHooks
1515 invokeClonedReposPostCloneHook
1616}
1717
1818installClonedReposHooks () {
19- cd ${repo} /.git
19+ cd " ${repo} /.git"
2020 rm -rf hooks
2121 ln -sf ../hooks
2222 cd - > /dev/null
2323}
2424
2525invokeClonedReposPostCloneHook () {
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
You can’t perform that action at this time.
0 commit comments