Created
April 12, 2019 23:40
-
-
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
This file contains 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 | |
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