Skip to content

Instantly share code, notes, and snippets.

@juanpasolano
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpasolano/2477bd7091c3e77daec0 to your computer and use it in GitHub Desktop.
Save juanpasolano/2477bd7091c3e77daec0 to your computer and use it in GitHub Desktop.
Run the vet enviroment
confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case $response in
[yY][eE][sS]|[yY])
true
;;
*)
false
;;
esac
}
runNodeApp (){
echo "Starting sails.js server..."
#osascript -e 'tell application "Terminal" to do script "juan; cd vetapp/sites/webapp/vetcrm; node app.js"'
osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' -e 'tell application "Terminal" to do script "juan; cd vetapp/sites/webapp/vetcrm; node app.js" in tab 2 of window 1'
echo "Starting gulp server..."
#osascript -e 'tell application "Terminal" to do script "juan; cd vetapp/sites/webapp/front; gulp"'
osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' -e 'tell application "Terminal" to do script "juan; cd vetapp/sites/webapp/front; gulp" in tab 3 of window 1'
}
#
# Starting pipe line
#
echo -e "\e[32mWe will initiate the vet app..."
echo "Starting Ammps..."
open /Applications/AMPPS/Ampps.app
echo -en "\e[0m"
confirm "Have you finished initiating AMPPS (apache and MySql)? [Y/N]" && runNodeApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment