Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.4 KiB

  1. #!/bin/bash
  2. PRELUDE_INSTALL_DIR="$HOME/.emacs.d"
  3. PRELUDE_URL=https://github.com/bbatsov/prelude.git
  4. echo -n "Checking to see if git is installed... "
  5. hash git 2>&- || { echo >&2 "not found. Aborting installation!"; exit 1; }
  6. echo "found"
  7. echo -n "Checking to see if aspell is installed... "
  8. hash aspell 2>&- || { echo >&2 "not found. Install aspell to benefit from flyspell-mode!"; }
  9. echo "found"
  10. echo -n "Checking to see if ack is installed... "
  11. hash ack 2>&- || { echo >&2 "not found. You'll need it to use ack-and-a-half!"; }
  12. echo "found"
  13. echo -n "Looking for an existing Emacs config..."
  14. if [ -d $PRELUDE_INSTALL_DIR ]
  15. then
  16. echo "Found an existing $PRELUDE_INSTALL_DIR. Backing it up to $PRELUDE_INSTALL_DIR.pre-prelude"
  17. mv $PRELUDE_INSTALL_DIR $PRELUDE_INSTALL_DIR.pre-prelude
  18. fi
  19. if [ -f ~/.emacs ]
  20. then
  21. echo "Found an existing ~/.emacs. Backing it up to ~/.emacs.pre-prelude"
  22. mv ~/.emacs ~/.emacs.pre-prelude
  23. fi
  24. echo -n "Cloning Emacs Prelude from GitHub... "
  25. /usr/bin/env git clone $PRELUDE_URL $PRELUDE_INSTALL_DIR > /dev/null
  26. cd $PRELUDE_INSTALL_DIR
  27. echo "done."
  28. echo '\e[34m ____ _ _ '
  29. echo '\e[34m| _ \ _ __ ___| |_ _ __| | ___ '
  30. echo '\e[34m| |_) | __/ _ \ | | | |/ _ |/ _ \'
  31. echo '\e[34m| __/| | | __/ | |_| | (_| | __/'
  32. echo '\e[34m|_| |_| \___|_|\__,_|\__,_|\___|'
  33. echo '\e[32m... is now installed and ready to do thy bidding!'