Last active
April 27, 2017 11:11
Revisions
-
aronwoost revised this gist
Jan 8, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ find public -iname '*.gz' -exec bash -c 'mv $0 ${0/.gz/}' {} \; echo "gzipping successful" echo "syncing gzipped files" s3cmd sync --progress --acl-public --reduced-redundancy --cf-invalidate --verbose --cf-invalidate-default-index --add-header 'Content-Encoding:gzip' public/* s3://$1/ --exclude '*.*' --include '*.html' --include '*.js' --include '*.css' echo "syncing gzipped files complete" echo "syncing non-gzipped files" -
aronwoost created this gist
Jan 7, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/bash # compress the files if they aren't find public/ -iname '*.html' -exec ./gzip_if_not_gzipped.sh {} \; find public/ -iname '*.js' -exec ./gzip_if_not_gzipped.sh {} \; find public/ -iname '*.css' -exec ./gzip_if_not_gzipped.sh {} \; # change their name back find public -iname '*.gz' -exec bash -c 'mv $0 ${0/.gz/}' {} \; echo "gzipping successful" echo "syncing gzipped files" s3cmd sync --progress --acl-public --reduced-redundancy --cf-invalidate --verbose --add-header 'Content-Encoding:gzip' public/* s3://$1/ --exclude '*.*' --include '*.html' --include '*.js' --include '*.css' echo "syncing gzipped files complete" echo "syncing non-gzipped files" s3cmd sync --progress --acl-public --reduced-redundancy --cf-invalidate --verbose public/* s3://$1/ --exclude '*.html' --exclude '*.js' --exclude '*.css' echo "syncing non-gzipped files complete"