Skip to content

Instantly share code, notes, and snippets.

@mwitek
Created August 11, 2012 18:15
Show Gist options
  • Save mwitek/3326111 to your computer and use it in GitHub Desktop.
Save mwitek/3326111 to your computer and use it in GitHub Desktop.
Shell functions to run mamp from terminal
#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