Created
November 17, 2011 22:42
-
-
Save skuro/1374802 to your computer and use it in GitHub Desktop.
Eclipse multiple workspace selection
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/sh | |
VERSION=0.1 | |
PRG=workspace | |
LS=`which ls` # avoid aliases | |
function usage() | |
{ | |
echo "$PRG -- switch to Eclipse workspace for a specific environments" | |
echo "v$VERSION by Carlo Sciolla <carlo.sciolla@gmail.com>" | |
echo | |
echo "Usage:" | |
echo " $PRG <environment>" | |
echo | |
echo "<environment> is one of the currently available Eclipse environment listed below:" | |
echo | |
for i in `$LS $SELECTOR_DIR` | |
do | |
echo " - $i" | |
done | |
echo | |
} | |
if [ $# == 0 ] | |
then | |
usage | |
else | |
ENV=`readlink $SELECTOR_DIR/$1` | |
cd $SELECTOR_DIR/$ENV/../workspace # smarter ways probably easy | |
echo "-> $PWD" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment