diff options
-rw-r--r-- | src/feed.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/feed.sh b/src/feed.sh index 9ca101a..d45e977 100644 --- a/src/feed.sh +++ b/src/feed.sh @@ -49,11 +49,11 @@ feed_download() url="${base_url}/Packages" fi - if ! ${WGET} -q -O "${list_file}.tmp" "${url}"; then + 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" + rm -f -- "${list_file}.tmp" return 1 fi rm -f "${list_file}.tmp" @@ -81,11 +81,12 @@ feed_download_cert() url="${base_url}/Packages" fi - if ! ${WGET} -q -O "${list_file}.tmp" "${url}"; then + if ! ${WGET} -q -O "${list_file}.tmp" -- "${url}"; then return 1 fi - if ! ${WGET} -q -O "${list_file}.sig" "${base_url}/Packages.sig"; then - rm -f "${list_file}.tmp" + if ! ${WGET} -q -O "${list_file}.sig" -- "${base_url}/Packages.sig" + then + rm -f -- "${list_file}.tmp" return 1 fi @@ -103,10 +104,10 @@ feed_download_cert() if ! ROOT="${root}" TMPDIR="${root}" USIGN="${usign}" \ WGET="${WGET}" GUNZIP="${GUNZIP}" "${opkg_cert}" \ verify "${list_file}.sig" "${list_file}.tmp"; then - rm -f "${list_file}.tmp" "${list_file}.sig" + rm -f -- "${list_file}.tmp" "${list_file}.sig" return 1 fi - mv "${list_file}.tmp" "${list_file}" + mv -- "${list_file}.tmp" "${list_file}" return 0 } |