Skip to content

Instantly share code, notes, and snippets.

@tutysara
Forked from lowstz/install-jdee.sh
Created July 12, 2012 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tutysara/3099522 to your computer and use it in GitHub Desktop.
Save tutysara/3099522 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-lisp"
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.....=========="
TMP_DIR="/tmp/jde"
mkdir -p $TMP_DIR
cd $TMP_DIR
# 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 "Paste this to the config file"
echo "(add-to-list 'load-path (expand-file-name "'$ELISP_DIR/jde/lisp'"))"
echo "(add-to-list 'load-path (expand-file-name "'$ELISP_DIR/cedet/common'"))"
echo "(load-file (expand-file-name "'$ELISP_DIR/cedet/common/cedet.el'"))"
echo "(add-to-list 'load-path (expand-file-name "'$ELISP_DIR/elib'"))"
echo "(require 'jde)"
rm -rf $TMP_DIR
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