Add 'PreComp-example.sh'

This commit is contained in:
bprieshof
2019-01-24 11:50:10 +01:00
parent ea083e1133
commit 6a502dffe2

14
PreComp-example.sh Normal file
View File

@@ -0,0 +1,14 @@
#setting Variables
domain=
nginxfolder=/var/www/${domain}
outputfolder=/tmp/brotli/${domain}
##No modifing
minify -r -o $outputfolder/ $nginxfolder
find $outputfolder/ -type f \( -name '*.html' -o -name '*.js' -o -name '*.json' -o -name '*.htm' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \) -exec brotli -v -k -f --best {} \;
find $outputfolder/ -type f \( -name '*.html' -o -name '*.js' -o -name '*.json' -o -name '*.htm' -o -name '*.css' -o -name '*.xml' -o -name '*.svg' \) -exec gzip -v -k -f --best {} \;
cp $outputfolder/*.{br,gz} $nginxfolder/