Skip to content

Instantly share code, notes, and snippets.

@larowlan
Created June 18, 2013 03:04
Show Gist options
  • Save larowlan/5802393 to your computer and use it in GitHub Desktop.
Save larowlan/5802393 to your computer and use it in GitHub Desktop.
Changes app/sites/default into a symlink
#!/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