From b1e28602c4c2cba01d1aa2803b1e028b0d0c0e2c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 21 Aug 2014 14:32:40 -0400 Subject: feed_download(): Optionally decompress index files --- (limited to 'lib') 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 } -- cgit v0.9.1