From 1f12075857bf821a7d8109efd9b95d4e2ebabfa9 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 16 Apr 2019 11:09:56 -0400 Subject: feed_download(): Support original opkg --- (limited to 'src') 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 } -- cgit v0.9.1