Last active
August 24, 2018 15:39
-
-
Save bitsgalore/3bea8c22fb34194e98446ea38041000a 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/bash | |
dirSurfDrive="/home/johan/ownCloud/blogkbresearch" | |
dirDeploy="/var/www/blog.kbresearch.nl" | |
# Scrape local instance of kbresearch blog to static site | |
# 24/8 removed --adjust-extension \ | |
wget --mirror \ | |
--page-requisites \ | |
--warc-file="blog-kbresearch-static" \ | |
--warc-cdx \ | |
--output-file="blog-kbresearch-static.log" \ | |
-e robots=off \ | |
http://blog.kbresearch.nl | |
# Rename style sheets | |
mv ./blog.kbresearch.nl/wp-content/themes/hemingway/fonts.css?ver=4.4.2 ./blog.kbresearch.nl/wp-content/themes/hemingway/fonts.css | |
mv ./blog.kbresearch.nl/wp-content/themes/hemingway/style.css?ver=4.4.2 ./blog.kbresearch.nl/wp-content/themes/hemingway/style.css | |
# Zip directory tree | |
zip -r blog.kbresearch.nl-static.zip ./blog.kbresearch.nl/ | |
# Zip Wordpress directory tree | |
zip -r wordpress.zip /var/www/html/wordpress/ | |
# Delete everything in deployment folder | |
sudo rm -rf $dirDeploy/* | |
# Copy files to server deployment folder | |
sudo cp -r ./blog.kbresearch.nl/* $dirDeploy | |
# Move files to SurfDrive folder | |
mv blog.kbresearch.nl-static.zip $dirSurfDrive | |
mv wordpress.zip $dirSurfDrive | |
mv blog-kbresearch-static.warc.gz $dirSurfDrive | |
mv blog-kbresearch-static.log $dirSurfDrive | |
#mv kbresearch.wordpress.2018-08-16.001.xml $dirSurfDrive | |
cp scrapesite-kbresearch.sh $dirSurfDrive | |
cp readme.txt $dirSurfDrive | |
# Go to SurDrive folder and create hash file | |
cd $dirSurfDrive | |
sha512sum * > checksums.sha512 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment