Skip to content

Instantly share code, notes, and snippets.

@predominant
Created February 10, 2011 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save predominant/820639 to your computer and use it in GitHub Desktop.
Save predominant/820639 to your computer and use it in GitHub Desktop.
CakePHP asset symlinking
#!/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