summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-16 11:09:56 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-16 11:10:32 (EDT)
commit1f12075857bf821a7d8109efd9b95d4e2ebabfa9 (patch)
tree4ded053acc365eb35cb7e267d6bca1fb8ae1241c /src
parent9ec1ab1b800b59cbbdcff1a29857a8a2d44a57c8 (diff)
feed_download(): Support original opkg
Diffstat (limited to 'src')
-rw-r--r--src/feed.sh7
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
}