2012-02-16 16:25:18 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
|
2012-04-17 20:23:53 +03:00
|
|
|
PRELUDE_URL=https://github.com/bbatsov/prelude.git
|
2012-02-16 16:25:18 +02:00
|
|
|
|
2012-02-17 12:34:08 +02:00
|
|
|
echo -n "Checking to see if git is installed... "
|
2012-05-07 17:38:16 +03:00
|
|
|
hash git 2>&- || { echo >&2 "not found. Aborting installation!"; exit 1; }
|
|
|
|
echo "found"
|
|
|
|
|
|
|
|
echo -n "Checking to see if aspell is installed... "
|
|
|
|
hash aspell 2>&- || { echo >&2 "not found. Install aspell to benefit from flyspell-mode!"; }
|
|
|
|
echo "found"
|
|
|
|
|
|
|
|
echo -n "Checking to see if ack is installed... "
|
|
|
|
hash ack 2>&- || { echo >&2 "not found. You'll need it to use ack-and-a-half!"; }
|
2012-02-17 12:34:08 +02:00
|
|
|
echo "found"
|
|
|
|
|
|
|
|
echo -n "Looking for an existing Emacs config..."
|
2012-04-05 11:07:20 +03:00
|
|
|
if [ -d $PRELUDE_INSTALL_DIR ]
|
2012-02-16 16:25:18 +02:00
|
|
|
then
|
2012-04-05 11:07:20 +03:00
|
|
|
echo "Found an existing $PRELUDE_INSTALL_DIR. Backing it up to $PRELUDE_INSTALL_DIR.pre-prelude"
|
2012-02-16 16:25:18 +02:00
|
|
|
mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ~/.emacs ]
|
|
|
|
then
|
2012-04-05 11:07:20 +03:00
|
|
|
echo "Found an existing ~/.emacs. Backing it up to ~/.emacs.pre-prelude"
|
2012-02-16 16:25:18 +02:00
|
|
|
mv ~/.emacs ~/.emacs.pre-prelude
|
|
|
|
fi
|
|
|
|
|
2012-02-17 12:34:08 +02:00
|
|
|
echo -n "Cloning Emacs Prelude from GitHub... "
|
2012-02-26 21:07:47 +02:00
|
|
|
/usr/bin/env git clone $PRELUDE_URL $PRELUDE_INSTALL_DIR > /dev/null
|
2012-04-04 18:32:47 +03:00
|
|
|
cd $PRELUDE_INSTALL_DIR
|
2012-02-17 12:34:08 +02:00
|
|
|
echo "done."
|
2012-02-16 16:25:18 +02:00
|
|
|
|
2012-05-07 17:38:16 +03:00
|
|
|
echo '\e[34m ____ _ _ '
|
|
|
|
echo '\e[34m| _ \ _ __ ___| |_ _ __| | ___ '
|
|
|
|
echo '\e[34m| |_) | __/ _ \ | | | |/ _ |/ _ \'
|
|
|
|
echo '\e[34m| __/| | | __/ | |_| | (_| | __/'
|
|
|
|
echo '\e[34m|_| |_| \___|_|\__,_|\__,_|\___|'
|
2012-02-16 16:25:18 +02:00
|
|
|
|
|
|
|
|
2012-05-07 17:38:16 +03:00
|
|
|
echo '\e[32m... is now installed and ready to do thy bidding!'
|