Created
November 1, 2012 15:37
-
-
Save nickboldt/3994424 to your computer and use it in GitHub Desktop.
Script to unpack Eclipse into reusable folder, with fresh workspace. Pass in -Dflags using single commandline arg in quotes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for new workspace: | |
# cd ~/eclipse/42clean; ./e e | |
# to reuse workspace: | |
# cd ~/eclipse/42clean; ./e | |
# to pass in -vmargs flags | |
# cd ~/eclipse/42clean; ./e e "-Dsomething=somevalue" | |
# or | |
# cd ~/eclipse/42clean; ./e "-Dsomething=somevalue" | |
workspace=/home/nboldt/eclipse/workspace-clean42 | |
target=/home/nboldt/eclipse/42clean | |
eclipse=/home/nboldt/tmp/Eclipse_Bundles/eclipse-jee-juno-linux-gtk-x86_64.tar.gz | |
eclipse=/home/nboldt/tmp/Eclipse_Bundles/eclipse-platform-4.2.1-linux-gtk-x86_64.tar.gz | |
eclipse=/home/nboldt/tmp/Eclipse_Bundles/eclipse-jee-juno-SR1-linux-gtk-x86_64.tar.gz | |
if [[ $1 == "e" ]]; then | |
echo "Wipe $target/eclipse and $workspace ..." | |
rm -fr $target/eclipse $workspace | |
echo "Unpack $eclipse ..." | |
tar xzf $eclipse | |
shift | |
fi | |
#export GDK_NATIVE_WINDOWS=true | |
./eclipse/eclipse -clean -showLocation -data $workspace -consolelog -console -vm /opt/sun-java2-6.0/bin/java -vmargs -Xms128M -Xmx256M -XX:PermSize=128M -XX:MaxPermSize=256M $1 2>&1 | tee "logs/eclipse.log.`date`.txt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment