Skip to content

Instantly share code, notes, and snippets.

@qwerty12
Created February 20, 2013 01:39
Show Gist options
  • Save qwerty12/4991967 to your computer and use it in GitHub Desktop.
Save qwerty12/4991967 to your computer and use it in GitHub Desktop.
Stupid wrapper for Sublime Text's JavaC Build System
#!/bin/sh
javac "$1"
if [ $? == 0 ]; then
#Thanks to Ken Pizzini: http://www.linuxmisc.com/12-unix-shell/4cd9a157aa806d45.htm
retval=`exec 3>&1; /opt/X11/bin/xterm -e sh -c '/usr/bin/java "'$2'" 3>&-; echo $? 1>&3; echo "Press ENTER to quit..."; read'`
rm "$2"*.class
exit $retval
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment