This scripts assumes you have a standard setup of platform. You'll also need make if you don't have it already (brew install make).
This will not work with rvm because rvm is a shady piece of software that does things in a very non-standard way and it was faster for me to switch to rbenv than make it work with rvm.
Download and put wherever you want the Makefile and challengepost.zsh files. Update the variables on top of these two files if needed.
Add
source 'path/to/challengepost.zsh'To your shell profile/env file. And source it.
Example for zsh:
echo "source 'path/to/challengepost.zsh'" >> $HOME/.zshenv
source $HOME/.zshenvSee the usage to see a description of all the available commands.
cpost usage
usage: cpost [mysql|redis|sunspot|memcached|nginx|unicorn]
cpost [stop_mysql|stop_redis|stop_sunspot|stop_memcached|stop_nginx|stop_unicorn]
cpost [COMMAND]
cpost COMMANDS:
cpost | cpost all starts the whole environment
cpost stop stops the entire environment
cpost mysql|stop_mysql starts/stops mysql server
cpost redis|stop_redis starts/stops redis server
cpost sunspot|stop_sunspot starts/stops sunspot
cpost memcached|stop_memcached starts/stops memcached server
cpost nginx|stop_nginx starts/stops nginx server
cpost unicorn|stop_unicorn starts/stops uniron server