Skip to content

Instantly share code, notes, and snippets.

@mbaynton
Created April 12, 2019 23:40
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 mbaynton/f92e7fdefbf7f80d693b147d9babd451 to your computer and use it in GitHub Desktop.
Save mbaynton/f92e7fdefbf7f80d693b147d9babd451 to your computer and use it in GitHub Desktop.
Finds web assets that should be served by the webserver and moves them to the docroot
#!/bin/bash
assets=`find core -regex '.*\.\(js\|css\|png\|jpg\|jpeg\|svg\|ico\)$'`
for ASSET in ${assets}; do
dir=$(dirname $ASSET)
if [[ ! -d "../html/$dir" ]]; then
mkdir -p "../html/$dir"
fi
cp -a $ASSET ../html/$ASSET
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment