-
-
Save dommmel/bb9b13c9222b0fdd9f32399fd3b1580d to your computer and use it in GitHub Desktop.
Revisions
-
dommmel revised this gist
Mar 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ function mamp() { CONF_FILE="/Applications/MAMP/conf/apache/httpd.conf" # # Fish existing doc root out of conf file LINE=$(cat $CONF_FILE | grep "^DocumentRoot") QUOTED_STRING=${LINE/DocumentRoot /} OLD_DOC_ROOT=${QUOTED_STRING//\"/} # -
jonathanstark revised this gist
Jan 23, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,5 +15,5 @@ function mamp() { sed -i.bak -e "s|${OLD_DOC_ROOT}|${NEW_DOC_ROOT}|g" $CONF_FILE # # Restart server sudo /Applications/MAMP/Library/bin/apachectl -k restart && sleep 2 && open "http://localhost:8888/" } -
jonathanstark created this gist
Jan 23, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ function mamp() { # # Default location of the apache conf file for MAMP CONF_FILE="/Applications/MAMP/conf/apache/httpd.conf" # # Fish existing doc root out of conf file LINE=$(cat $CONF_FILE | grep ^DocumentRoot) QUOTED_STRING=${LINE/DocumentRoot /} OLD_DOC_ROOT=${QUOTED_STRING//\"/} # # Set new doc root to current directory NEW_DOC_ROOT=$(pwd) # # Replace doc root strings in conf file sed -i.bak -e "s|${OLD_DOC_ROOT}|${NEW_DOC_ROOT}|g" $CONF_FILE # # Restart server sudo /Applications/MAMP/Library/bin/apachectl -k restart && sleep 2 && open "http://localhost/" }