Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
vcsh: do not create .gitignore.d if VCSH_GITIGNORE == none
  • Loading branch information
ghedo authored and RichiH committed Jul 13, 2013
1 parent 78a8805 commit 809b0ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vcsh
Expand Up @@ -358,9 +358,8 @@ if echo $VCSH_REPO_NAME | grep -q '/'; then
export VCSH_REPO_NAME=$(basename "$VCSH_REPO_NAME" .git)
fi


for check_directory in "$VCSH_REPO_D" "$VCSH_BASE/.gitignore.d"
do
check_dir() {
check_directory=$1
if [ ! -d "$check_directory" ]; then
if [ -e "$check_directory" ]; then
fatal "'$check_directory' exists but is not a directory" 13
Expand All @@ -369,7 +368,10 @@ do
mkdir -p "$check_directory" || fatal "could not create '$check_directory'" 50
fi
fi
done
}

check_dir "$VCSH_REPO_D"
[ ! "x$VCSH_GITIGNORE" = 'xnone' ] && check_dir "$VCSH_BASE/.gitignore.d"

verbose "$VCSH_COMMAND begin"
export VCSH_COMMAND=$(echo $VCSH_COMMAND | sed 's/-/_/g')
Expand Down

0 comments on commit 809b0ac

Please sign in to comment.