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
function switchGrails() { | |
echo "Switching to groovy version: $1" | |
echo "Switching to grails version: $2" | |
sudo rm /usr/local/{groovy,grails} | |
sudo ln -s /usr/lib/groovy/$1 /usr/local/groovy | |
sudo ln -s /usr/lib/grails/$2 /usr/local/grails | |
echo "Done!" | |
ls -latr /usr/local/{groovy,grails} | |
} |
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 | |
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" |
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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
BOLD=$(tput bold) | |
RESET=$(tput sgr0) | |
#PS1="\w\[$BOLD\]\$(parse_git_branch)\[$RESET\]$ " #for presenting... | |
PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\[$BOLD\]\$(parse_git_branch)\[$RESET\]$ " |
NewerOlder