Skip to content

Instantly share code, notes, and snippets.

@predominant
Created February 10, 2011 14:52
Embed
What would you like to do?
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