Revised minimalistic grails wrapper

Finally switched to GVM but still wanted to have the trivial "version detection". Make sure to have the script in PATH before GVM or don't name it grails.

#!/bin/sh
version=current
if test -f "./application.properties"; then
        version=`cat ./application.properties | perl -ne 'print "$1" if (/app.grails.version=([0-9\.]+)$/)'`
fi
export GRAILS_HOME="$HOME/.gvm/grails/$version"
"$GRAILS_HOME/bin/grails" "$*"