Created
December 11, 2019 12:51
-
-
Save vanzhiganov/e7bd45b7d7d10349d7c58d04c9cb5f7c to your computer and use it in GitHub Desktop.
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/sh | |
rm -rf /home/project/* | |
FOLDER=/home/project | |
cp ./*.php $FOLDER | |
cp -r css img js $FOLDER | |
FILES=$(find css js templates -type f -regex '.*.\(js\|css\|twig\)') | |
for f in $FILES; do | |
echo "$f"|grep twig 1>/dev/null | |
r=$? | |
if [ "$r" -eq 0 ]; then | |
minify --type html "$f" --output $FOLDER | |
else | |
minify "$f" --output $FOLDER | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment