From 7d795df9abb5a907d480339ac5f3a5030a690510 Mon Sep 17 00:00:00 2001 From: Richard Hartmann Date: Fri, 18 Nov 2011 18:54:46 +0100 Subject: [PATCH 1/1] Create .gitignore.d/ in case it does not exist --- vcsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcsh b/vcsh index 6de5f56..9736bc6 100755 --- a/vcsh +++ b/vcsh @@ -6,13 +6,14 @@ SELF=$(basename $0) [ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config" [ -z "$VCSH_BASE" ] && VCSH_BASE="$XDG_CONFIG_HOME/vcsh/repo.d" -for check_directory in "$VCSH_BASE" +for check_directory in "$VCSH_BASE" "$HOME/.gitignore.d" do if [ ! -d "$check_directory" ]; then if [ -e "$check_directory" ]; then echo "$SELF: error: $check_directory exists but is not a directory" >&2 exit 2 else + echo "$SELF: attempting to create $check_directory" mkdir -p "$check_directory" || (echo "$SELF: error: could not create $check_directory" >&2; exit 2) fi fi -- 2.39.5