diff options
-rw-r--r-- | src/feed.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/feed.sh b/src/feed.sh index a29ea0a..33d818b 100644 --- a/src/feed.sh +++ b/src/feed.sh @@ -35,6 +35,7 @@ feed_download() local list_file="${2}" local use_gzip="${3}" local url= + local gunzip= if ${use_gzip}; then url="${base_url}/Packages.gz" @@ -42,7 +43,11 @@ feed_download() url="${base_url}/Packages" fi - ${WGET} -q -O "${list_file}" "${url}" + case "${list_file}" in + *.gz) gunzip="${GUNZIP}";; + *) gunzip='cat';; + esac + ${WGET} -q -O - "${url}" | ${gunzip} >"${list_file}" return 0 } |