Created
February 10, 2011 14:52
-
-
Save predominant/820639 to your computer and use it in GitHub Desktop.
CakePHP asset symlinking
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 characters
#!/bin/bash | |
if [ ! -d "webroot" ]; then | |
echo "Doesn't look like a CakePHP application." | |
echo "Make sure you are in the APP directory." | |
exit 1 | |
fi | |
cd webroot | |
echo "# Checking plugins..." | |
echo " cd webroot" | |
find ../plugins -type d -name webroot | awk -F/ '{print " ln -s " $0 " " $3}' | |
echo "" | |
echo "# Checking themes..." | |
if [ ! -d "theme" ]; then | |
mkdir theme | |
fi | |
cd theme | |
echo " cd theme" | |
find ../../views/themed -type d -name webroot | awk -F/ '{print " ln -s " $0 " " $5}' | |
echo "" | |
echo " cd ../../" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment