summaryrefslogtreecommitdiffstats
path: root/lib/feed.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-08-21 14:32:40 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-08-21 14:32:40 (EDT)
commitb1e28602c4c2cba01d1aa2803b1e028b0d0c0e2c (patch)
tree36e1310585d49b31b0bacd79f7fa912d9276055a /lib/feed.sh
parentd072ca8d990ddee02dc69f8ece42ba495e332a6f (diff)
feed_download(): Optionally decompress index files
Diffstat (limited to 'lib/feed.sh')
-rw-r--r--lib/feed.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/feed.sh b/lib/feed.sh
index 6dcf4c1..87009da 100644
--- a/lib/feed.sh
+++ b/lib/feed.sh
@@ -35,8 +35,16 @@ feed_deps=
feed_download()
{
local feed_index="${1}"
+ local use_gzip="${2}"
+ local gzip=
- wget -q -O - "${feed_index}"
+ if ${use_gzip}; then
+ gzip=gzip
+ else
+ gzip=cat
+ fi
+
+ wget -q -O - "${feed_index}" | ${gzip}
return 0
}