From 52e2e165e3dfc809a16f5797ef8d569a72e77b6c Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 16 Feb 2012 16:25:18 +0200 Subject: [PATCH] added an automated installer --- README.md | 14 ++++++++++++++ utils/installer.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 utils/installer.sh diff --git a/README.md b/README.md index 0be0cfc..9860ff7 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,20 @@ The following list will be expanded greatly in the future. ## Installation +### Automated + +You can install Emacs via the command line with either `curl` or `wget`. + +If you're using `curl` type the following command: + +`curl -L https://github.com/bbatsov/emacs-prelude/raw/master/utils/installer.sh | sh` + +If you're using `wget` type: + +`wget --no-check-certificate https://github.com/bbatsov/emacs-prelude/raw/master/utils/installer.sh -O - | sh` + +### Manual + ```bash $ git clone git://github.com/bbatsov/emacs-prelude.git path/to/local/repo $ ln -s path/to/local/repo ~/.emacs.d diff --git a/utils/installer.sh b/utils/installer.sh new file mode 100755 index 0000000..88d9ba7 --- /dev/null +++ b/utils/installer.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +PRELUDE_INSTALL_DIR="$HOME/.emacs.d" + +echo "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" + mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude +fi + +if [ -f ~/.emacs ] +then + echo "Found ~/.emacs. Backing up to ~/.emacs.pre-prelude" + mv ~/.emacs ~/.emacs.pre-prelude +fi + + +echo "Cloning Emacs Prelude from GitHub..." +/usr/bin/env git clone https://github.com/bbatsov/emacs-prelude.git $PRELUDE_INSTALL_DIR + +echo ' _____ ____ _ _ ' +echo '| ____|_ __ ___ __ _ ___ ___ | _ \ _ __ ___| |_ _ __| | ___ ' +echo '| _| | _ _ \ / _ |/ __/ __| | |_) | __/ _ \ | | | |/ _ |/ _ \' +echo '| |___| | | | | | (_| | (__\__ \ | __/| | | __/ | |_| | (_| | __/' +echo '|_____|_| |_| |_|\__,_|\___|___/ |_| |_| \___|_|\__,_|\__,_|\___|' + + +echo '... is now installed!'