Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ColinHarrington/393855 to your computer and use it in GitHub Desktop.
Save ColinHarrington/393855 to your computer and use it in GitHub Desktop.
#!/bin/sh
GIT_BRANCH=`git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
GRAILS_SCRIPT=$GRAILS_HOME/bin/grails
if [ $GIT_BRANCH ]; then
GRAILS_WORK_DIR=`echo ~`/.grails_$GIT_BRANCH``
echo "** grails working directory: $GRAILS_WORK_DIR"
$GRAILS_SCRIPT -Dgrails.work.dir=$GRAILS_WORK_DIR $@
else
echo "** default grails working directory"
$GRAILS_SCRIPT $@
fi
@ColinHarrington
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment