(Arne Babenhauserheide)
2012-06-18: create .local if it does not exist. create .local if it does not exist.
diff --git a/setup_infocalypse_on_linux.sh b/setup_infocalypse_on_linux.sh
--- a/setup_infocalypse_on_linux.sh
+++ b/setup_infocalypse_on_linux.sh
@@ -2,10 +2,12 @@
# Install and prepare infocalypse on your system.
-echo -n "Where do you store your Mercurial plugins? [~/.local/hgext]: "
+default="$HOME/.local/hgext"
+
+echo -n "Where do you store your Mercurial plugins? [$default]: "
read hgext
if [ "$hgext" == "" ]; then
- hgext="$HOME/.local/hgext"
+ hgext="$default"
fi
# enter hgext. Create it if necessary and requested
@@ -14,7 +16,9 @@
echo -n "Folder \"$hgext\" does not exist. Create it? [Y/n] "
read create
if [ "$create" != "n" ]; then
- mkdir $hgext
+ if [ "$hgext" == "$default" ]; then
+ mkdir $HOME/.local/
+ mkdir $hgext
fi
fi
if [ "$?" != "0" ]; then