Created
April 18, 2017 08:11
-
-
Save DagW/e69625f0681e76c2237780a7caae8ca5 to your computer and use it in GitHub Desktop.
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 characters
#!/bin/bash | |
TMPPATH=/tmp/site/ | |
BUCKET=s3://wullt.net/ | |
rm -rf $TMPPATH | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains DOMAIN.TO.SYNC.COM \ | |
--no-parent \ | |
$TMPPATH | |
/usr/local/bin/aws s3 sync $TMPPATH $BUCKET | |
#Optional, I want to serve files as "domain.com/about" without extension | |
aws s3 cp \ | |
--include "*" \ | |
--exclude "*.*" \ | |
--content-type="text/html" \ | |
--metadata-directive="REPLACE" \ | |
--recursive \ | |
$BUCKET \ | |
$BUCKET |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment