Merge pull request #597 from benprew/patch-1

Update installer.sh
This commit is contained in:
Bozhidar Batsov 2014-07-05 10:35:32 +02:00
commit 31b84dc749

View file

@ -78,7 +78,7 @@ usage() {
printf " -s, --source [url] \t \t Clone prelude from 'url'.\n" printf " -s, --source [url] \t \t Clone prelude from 'url'.\n"
printf " \t \t \t \t Defaults to 'https://github.com/bbatsov/prelude.git'.\n" printf " \t \t \t \t Defaults to 'https://github.com/bbatsov/prelude.git'.\n"
printf " -n, --no-bytecompile \t \t Skip the bytecompilation step of prelude.\n" printf " -n, --no-bytecompile \t \t Skip the bytecompilation step of prelude.\n"
printf " -i, --into \t \t \t Install Prelude into the existing configuration\n" printf " -i, --into \t \t \t Install Prelude into a subdirectory in the existing configuration\n"
printf " \t \t \t \t The default behavious is to install prelude into the existing\n" printf " \t \t \t \t The default behavious is to install prelude into the existing\n"
printf " \t \t \t \t emacs configuration.\n" printf " \t \t \t \t emacs configuration.\n"
printf " -h, --help \t \t \t Display this help and exit\n" printf " -h, --help \t \t \t Display this help and exit\n"
@ -196,7 +196,7 @@ then
tar -cf "$PRELUDE_INSTALL_DIR.pre-prelude.tar" "$PRELUDE_INSTALL_DIR" > /dev/null 2>&1 tar -cf "$PRELUDE_INSTALL_DIR.pre-prelude.tar" "$PRELUDE_INSTALL_DIR" > /dev/null 2>&1
PRELUDE_INSTALL_DIR_ORIG="$PRELUDE_INSTALL_DIR" PRELUDE_INSTALL_DIR_ORIG="$PRELUDE_INSTALL_DIR"
# Overwrite existing? # Overwrite existing?
[ -n "$PRELUDE_INTO" ] || PRELUDE_INSTALL_DIR="$PRELUDE_INSTALL_DIR/prelude" [ -n "$PRELUDE_INTO" ] && PRELUDE_INSTALL_DIR="$PRELUDE_INSTALL_DIR/prelude"
# Clear destination directory for git clone to work # Clear destination directory for git clone to work
rm -fr "$PRELUDE_INSTALL_DIR" rm -fr "$PRELUDE_INSTALL_DIR"
mkdir "$PRELUDE_INSTALL_DIR" mkdir "$PRELUDE_INSTALL_DIR"
@ -205,7 +205,7 @@ then
make_prelude_dirs make_prelude_dirs
# Reinstate files that weren't replaced # Reinstate files that weren't replaced
tar --skip-old-files -xf "$PRELUDE_INSTALL_DIR_ORIG.pre-prelude.tar" "$PRELUDE_INSTALL_DIR" > /dev/null 2>&1 tar --skip-old-files -xf "$PRELUDE_INSTALL_DIR_ORIG.pre-prelude.tar" "$PRELUDE_INSTALL_DIR" > /dev/null 2>&1
[ -n "$PRELUDE_INTO" ] || cp "$PRELUDE_INSTALL_DIR/sample/prelude-modules.el" "$PRELUDE_INSTALL_DIR" [ -n "$PRELUDE_INTO" ] && cp "$PRELUDE_INSTALL_DIR/sample/prelude-modules.el" "$PRELUDE_INSTALL_DIR"
elif [ -e "$PRELUDE_INSTALL_DIR" ] elif [ -e "$PRELUDE_INSTALL_DIR" ]
then then
# File exist but not a regular file or directory # File exist but not a regular file or directory