From db1e2b298892da1f31870e3fc8e19997210c4148 Mon Sep 17 00:00:00 2001 From: bas smit Date: Sat, 23 Jun 2012 11:44:29 +0200 Subject: [PATCH] Check if prelude is installed before anything else. --- utils/installer.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/installer.sh b/utils/installer.sh index 7b0a2fd..5825785 100755 --- a/utils/installer.sh +++ b/utils/installer.sh @@ -139,6 +139,15 @@ then printf "$RESET" fi +# If prelude is already installed +if [ -d $PRELUDE_INSTALL_DIR/prelude ] +then + printf "\n\n$BRED" + printf "You already have Prelude installed.$RESET\nYou'll need to remove $PRELUDE_INSTALL_DIR/prelude if you want to install Prelude again.\n" + printf "If you want to update your copy of prelude, run 'git pull origin master' from your prelude directory\n\n" + exit 1; +fi + ### Check dependencies printf "$CYAN Checking to see if git is installed... $RESET" if hash git 2>&- @@ -171,15 +180,6 @@ then printf "$YELLOW WARNING:$RESET Prelude depends on emacs $RED 24$RESET !\n" fi -# If prelude is already installed -if [ -d $PRELUDE_INSTALL_DIR/prelude ] -then - printf "\n\n$BRED" - printf "You already have Prelude installed.$RESET\nYou'll need to remove $PRELUDE_INSTALL_DIR/prelude if you want to install Prelude again.\n" - printf "If you want to update your copy of prelude, run 'git pull origin master' from your prelude directory\n\n" - exit 1; -fi - if [ -d $PRELUDE_INSTALL_DIR ] || [ -f $PRELUDE_INSTALL_DIR ] then # Existing file/directory found -> backup