Skip to content

Instantly share code, notes, and snippets.

@lowstz
Created February 28, 2012 19:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lowstz/1934718 to your computer and use it in GitHub Desktop.
Save lowstz/1934718 to your computer and use it in GitHub Desktop.
A simple script to install JDE for Emacs (JDEE)
#!/bin/sh
# Change `ELISP_DIR` variable as you needed
ELISP_DIR="$HOME/.emacs.d/site"
MIRROR="https://lowstz.org/jdee"
echo -n "This script require wget and unzip, please ensure that your system has been installed them?[yes/no]:"
read choice
case $choice in
YES|yes|Y|y)
echo "==========Start the installation.....=========="
mkdir jde-tmp
cd jde-tmp
# Download JDEE and Dependencies packages
wget -c "$MIRROR/jdee-bin-2.4.0.1.zip" --no-check-certificate
wget -c "$MIRROR/ant-contrib-1.0b3-bin.tar.bz2" --no-check-certificate
wget -c "$MIRROR/apache-ant-svn-0.1-2010-01-08-bin.tar.bz2" --no-check-certificate
wget -c "$MIRROR/cedet-1.0beta3b.tar.gz" --no-check-certificate
wget -c "$MIRROR/elib-1.0.zip" --no-check-certificate
unzip jdee-bin-2.4.0.1.zip
tar -jxvf ant-contrib-1.0b3-bin.tar.bz2
tar -jxvf apache-ant-svn-0.1-2010-01-08-bin.tar.bz2
tar -zxvf cedet-1.0beta3b.tar.gz
unzip elib-1.0.zip
cp -R jdee-2.4.0.1 $ELISP_DIR/jde
cp -R ant-contrib $ELISP_DIR/ant-contrib
cp -R apache-ant-svn-0.1-SNAPSHOT $ELISP_DIR/apache-ant
cp -R cedet-1.0beta3b $ELISP_DIR/cedet
cp -R elib-1.0 $ELISP_DIR/elib
# Modify ~/.emacs
echo "(add-to-list 'load-path (expand-file-name "$ELISP_DIR/jde/lisp"))" >> ~/.emacs
echo "(add-to-list 'load-path (expand-file-name "$ELISP_DIR/cedet/common"))" >> ~/.emacs
echo "(load-file (expand-file-name "$ELISP_DIR/cedet/common/cedet.el"))" >> ~/.emacs
echo "(add-to-list 'load-path (expand-file-name "$ELISP_DIR/elib"))" >> ~/.emacs
echo "(require 'jde)" >> ~/.emacs
rm -rf $PWD
echo "Installation complete, Try to run emacs and check the JDEE is working properly"
;;
NO|no|N|n)
echo "Please install the wget and unzip then run this srcipt again!"
exit
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment