Created
January 4, 2014 21:22
-
-
Save dnlmzw/8260901 to your computer and use it in GitHub Desktop.
Create symbolic link for MAMP "htdocs"-folder to current Terminal window path. Finally open localhost:8888. Shortcut through "setdocs" with alias.
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
alias setdocs="~/Dropbox/Scripts/set_htdocs_open_localhost.sh" |
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
CUR_PATH=${PWD} | |
MAMP_PATH="/Applications/MAMP/" | |
MAMP_PATH_HTDOCS="/Applications/MAMP/htdocs" | |
echo | |
echo "Removing Symlink:" | |
echo ${MAMP_PATH_HTDOCS} | |
sudo rm ${MAMP_PATH_HTDOCS} | |
echo | |
echo "Creating symlink for:" | |
echo ${CUR_PATH} | |
ln -s ${CUR_PATH} ${MAMP_PATH_HTDOCS} | |
echo | |
echo "Opening localhost" | |
open "http://localhost:8888" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment