X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/c189913f6c8eebaa6f2dcfcd666ccc4b17ec6c26..5a09744796fd46762c35cb9a1590c1c49cb07e3d:/vcsh diff --git a/vcsh b/vcsh index bf97cbf..4854f5e 100755 --- a/vcsh +++ b/vcsh @@ -1,7 +1,7 @@ #!/bin/sh # This program is licensed under the GNU GPL version 2 or later. -# (c) Richard "RichiH" Hartmann , 2011 +# (c) Richard "RichiH" Hartmann , 2011-2012 # For details, see LICENSE. To submit patches, you have to agree to # license your code under the GNU GPL version 2 or later. @@ -94,9 +94,9 @@ delete() { $files AGAIN, THIS WILL DELETE YOUR DATA! -To continue, type \"Yes, do as I say\"" +To continue, type 'Yes, do as I say'" read answer - [ "x$answer" = "xYes, do as I say" ] || exit 16 + [ "x$answer" = 'xYes, do as I say' ] || exit 16 for file in $files; do rm -f $file || info "could not delete '$file', continuing with deletion" done @@ -115,9 +115,9 @@ git_dir_exists() { } hook() { - for f in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do - [ -x "$f" ] || continue - "$f" + for hook in $VCSH_HOOK_D/$1* $VCSH_HOOK_D/$VCSH_REPO_NAME.$1*; do + [ -x "$hook" ] || continue + "$hook" done } @@ -167,11 +167,13 @@ run() { } setup() { + hook pre-setup use git config core.worktree "$GIT_WORK_TREE" git config core.excludesfile ".gitignore.d/$VCSH_REPO_NAME" git config vcsh.vcsh 'true' [ -e "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" ] && git add -f "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" + hook post-setup } use() {