#!/bin/bash # # Httrack feed downloader. # # Configuration source config || exit 1 # Load functions source lib/httracker/functions || exit 1 # Create folders mkdir -p $MIRRORS $TMP # Get URL # Thanks http://stackoverflow.com/questions/443991/how-to-parse-rss-feeds-xml-in-a-shell-script curl -s "$FEED" | grep -o '[^<]*' | grep -o "[^>]*$" > $URLS if [ "$?" != "0" ]; then echo "Error downloading feed $FEED, aborting." exit 1 fi # Iterate over all URLs httracker_iterate # Cleanup rm -rf $TMP