Skip to content

Instantly share code, notes, and snippets.

@radmiraal
Last active August 29, 2015 14:06
Show Gist options
  • Save radmiraal/5dbc8522ef7c8a42bee1 to your computer and use it in GitHub Desktop.
Save radmiraal/5dbc8522ef7c8a42bee1 to your computer and use it in GitHub Desktop.
Temporary creation of static packages symlinks in Flow on your deployment server
#!/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