aboutsummaryrefslogtreecommitdiff
path: root/httracker
blob: 59fcfa90385890a779b60d4f1fd5dbe82cc2e19c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#
# Httrack feed downloader.
#

# Load and initialize
source `dirname $0`/lib/httracker/functions || exit 1

# Get URLs from feed
# Thanks http://stackoverflow.com/questions/443991/how-to-parse-rss-feeds-xml-in-a-shell-script
curl -s "$FEED" | grep -o '<link>[^<]*' | grep -o "[^>]*$" \
     | `dirname $0`/lib/httracker/html.sed > $URLS

if [ "$?" != "0" ]; then
  echo "Error downloading feed $FEED, aborting."
  exit 1
fi

# Iterate over all URLs
httracker_iterate

# Done
httracker_teardown