Skip to content

Instantly share code, notes, and snippets.

@benek
Last active December 14, 2015 09:50
Show Gist options
  • Save benek/5068154 to your computer and use it in GitHub Desktop.
Save benek/5068154 to your computer and use it in GitHub Desktop.
Shell script para cambiar entre versiones de Grails en la consola
#!/bin/bash
# Shell script para cambiar la versión de Grails en el PATH
echo "Cambiando versión de Grails en variable PATH..."
if [ "$1" = "1.3" ] ; then
echo "Cambiando a versión 1.3.7..."
export GRAILS_HOME=/Users/benek/Downloads/grails-1.3.7
elif [ "$1" = "1.2" ] ; then
echo "Cambiando a versión 1.3.7..."
export GRAILS_HOME=/Users/benek/Downloads/grails-1.2-M3
elif [ "$1" = "2" ] ; then
echo "Cambiando a versión 2.1.0..."
export GRAILS_HOME=/Users/benek/Downloads/grails-2.1.0
fi
export PATH=$PATH:$GRAILS_HOME/bin
echo "Nuevos valores."
echo "GRAILS_HOME: $GRAILS_HOME"
echo "PATH: $PATH"
echo ":::::::::::: FIN ::::::::::::"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment