From 22d9854bbb2cd3fb66210c6cb17b9bcaca0f6d80 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Fri, 17 Feb 2012 12:34:08 +0200 Subject: [PATCH] fixed #70 - signal an error if git is not installed --- utils/installer.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/utils/installer.sh b/utils/installer.sh index 88d9ba7..f75c9ff 100755 --- a/utils/installer.sh +++ b/utils/installer.sh @@ -2,7 +2,11 @@ PRELUDE_INSTALL_DIR="$HOME/.emacs.d" -echo "Looking for an existing Emacs config..." +echo -n "Checking to see if git is installed... " +hash git 2>&- || { echo >&2 "not found. Aborting installation!'."; exit 1; } +echo "found" + +echo -n "Looking for an existing Emacs config..." if [ -f $PRELUDE_INSTALL_DIR ] then echo "Found $PRELUDE_INSTALL_DIR. Backing up to $PRELUDE_INSTALL_DIR.pre-prelude" @@ -16,8 +20,9 @@ then fi -echo "Cloning Emacs Prelude from GitHub..." -/usr/bin/env git clone https://github.com/bbatsov/emacs-prelude.git $PRELUDE_INSTALL_DIR +echo -n "Cloning Emacs Prelude from GitHub... " +/usr/bin/env git clone https://github.com/bbatsov/emacs-prelude.git $PRELUDE_INSTALL_DIR > /dev/null +echo "done." echo ' _____ ____ _ _ ' echo '| ____|_ __ ___ __ _ ___ ___ | _ \ _ __ ___| |_ _ __| | ___ '