diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 19:47:52 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-25 19:47:52 (EDT) |
commit | 3b4faf7fdfe450c5fe044c5f1740d83fc36b2ce3 (patch) | |
tree | 89b2c3cc0bd6d5ab845b8ec76adc701600da3289 | |
parent | 2a393afa320ab898bb3e9dc261539f590fb4bdab (diff) |
src/feed.sh: Delimit command operands
-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 } |