From 6c35678d1990e9195b7bda9437d58f77fa9c65de Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 16 Apr 2019 23:03:07 -0400 Subject: feed_download(): Check for errors --- (limited to 'src') diff --git a/src/feed.sh b/src/feed.sh index 356902e..5f8d86b 100644 --- a/src/feed.sh +++ b/src/feed.sh @@ -48,7 +48,14 @@ feed_download() url="${base_url}/Packages" fi - ${WGET} -q -O - "${url}" | ${gunzip} >"${list_file}" + if ! ${WGET} -q -O "${list_file}.tmp" "${url}"; then + return 1 + fi + if ! ${gunzip} <"${list_file}.tmp" >"${list_file}"; then + rm -f "${list_file}.tmp" + return 1 + fi + rm -f "${list_file}.tmp" return 0 } -- cgit v0.9.1