Created
June 18, 2013 03:04
-
-
Save larowlan/5802393 to your computer and use it in GitHub Desktop.
Changes app/sites/default into a symlink
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
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage die-defaults site-name" | |
exit 1; | |
fi | |
if [ -d "./app/sites/$1" ]; then | |
if [ -d "./app/sites/default" ]; then | |
sudo rm -rf ./app/sites/default; | |
cd ./app/sites | |
ln -s $1 default | |
git update-index --assume-unchanged ./app/sites/default | |
echo "Done" | |
exit 0; | |
fi | |
echo "Default folder does not exist" | |
exit 2 | |
fi | |
echo "No such site $1" | |
exit 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment