Skip to content
Snippets Groups Projects
Commit 809b0acc authored by Alessandro Ghedini's avatar Alessandro Ghedini Committed by Richard Hartmann
Browse files

vcsh: do not create .gitignore.d if VCSH_GITIGNORE == none

parent 78a88056
Branches
Tags
No related merge requests found
......@@ -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
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment