Skip to content
Snippets Groups Projects
Commit 2db7eb61 authored by Corey Quinn's avatar Corey Quinn Committed by Richard Hartmann
Browse files

Test conditions for ~/.config

parent 875822ee
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,18 @@ ...@@ -4,6 +4,18 @@
SELF=$(basename $0) SELF=$(basename $0)
[ -z $XDG_CONFIG_HOME ] && XDG_CONFIG_HOME="$HOME/.config" [ -z $XDG_CONFIG_HOME ] && XDG_CONFIG_HOME="$HOME/.config"
for dir in $XDG_CONFIG_HOME $XDG_CONFIG_HOME/vcsh $XDG_CONFIG_HOME/vcsh/repo.d
do
if [ ! -d $dir ]; then
if [ -e $dir ]; then
echo "$SELF: error: $dir exists but is not a directory" >&2
return 2
else
mkdir $dir || (echo "$SELF: error: could not create $dir" >&2; return 2)
fi
fi
done
VCSH_BASE="$XDG_CONFIG_HOME/vcsh/repo.d" VCSH_BASE="$XDG_CONFIG_HOME/vcsh/repo.d"
help() { help() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment