Last active
August 29, 2015 14:06
-
-
Save radmiraal/5dbc8522ef7c8a42bee1 to your computer and use it in GitHub Desktop.
Temporary creation of static packages symlinks in Flow on your deployment server
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 Web/_Resources/Static/Packages ]; then | |
rm -rf Web/_Resources/Static/Packages | |
fi | |
mkdir -p Web/_Resources/Static/Packages | |
find $(pwd) -type d -path "*/Resources/Public" -print0 | while IFS= read -r -d $'\0' line; do | |
if [[ $line =~ Packages/[^/]+/([^/]+) ]]; then | |
packageKey=${BASH_REMATCH[1]} | |
ln -s $line Web/_Resources/Static/Packages/$packageKey | |
echo "Created symlink for $packageKey" | |
fi | |
done | |
# Do all your grunty stuff here | |
rm -rf Web/_Resources/Static/Packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment