Last active
August 29, 2015 14:13
-
-
Save juanpasolano/2477bd7091c3e77daec0 to your computer and use it in GitHub Desktop.
Run the vet enviroment
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
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