#!/bin/bash

# Mirror a Blogspot web site.
# The argument should be its domain, NOT its full URL.
# If the domain needs to be different, include that as a second arg.

DOMAIN=$2
if [[ -z $DOMAIN ]]; then DOMAIN=$1; fi
echo "DOMAIN =" $DOMAIN

# Rejecting "*?showComment*" makes a big difference.
# -pH -D "..." causes it to download the inline images.
wget -mk -R "*?showComment*" -pH -D "$DOMAIN,1.bp.blogspot.com,2.bp.blogspot.com,3.bp.blogspot.com,4.bp.blogspot.com" $1
