Created
August 11, 2012 18:15
-
-
Save mwitek/3326111 to your computer and use it in GitHub Desktop.
Shell functions to run mamp from terminal
This file contains hidden or 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
#function to run mamp from terminal. Below are the instructions... | |
# Step 1. In terminal type: open ~/.bash_profile | |
# Step 2. Copy the below functions to the bottom of .bash_profile and save | |
# Step 3. Restart terminal and done! | |
# Now you can run mamp from terminal! | |
# To start mamp type: mampstart <optional port number> | |
#example for above: mampstart 8080 | |
# To stop mamp type: mampstop | |
## copy these functions to .bash_profile | |
function mampstart(){ | |
killAll mysqld | |
/Applications/MAMP/bin/startMysql.sh | |
/Applications/MAMP/bin/startApache.sh | |
open "http://localhost:$@" | |
} | |
function mampstop(){ | |
/Applications/MAMP/bin/stopMysql.sh | |
/Applications/MAMP/bin/stopApache.sh | |
} | |
## END of functions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment