Commit d6d11a75 authored by Simon Ruderich's avatar Simon Ruderich

quote output filename

Shouldn't be necessary for output from `mktemp`, but better play it
safe.
parent 2e8454b4
......@@ -43,11 +43,11 @@ hex2bin() {
_request() {
temperr="$(mktemp)"
if [ "${1}" = "head" ]; then
curl -sSf -I "${2}" 2>${temperr}
curl -sSf -I "${2}" 2>"${temperr}"
elif [ "${1}" = "get" ]; then
curl -sSf "${2}" 2>${temperr}
curl -sSf "${2}" 2>"${temperr}"
elif [ "${1}" = "post" ]; then
curl -sSf "${2}" -d "${3}" 2>${temperr}
curl -sSf "${2}" -d "${3}" 2>"${temperr}"
fi
if [ ! -z "$(<${temperr})" ]; then echo " + ERROR: An error occured while sending ${1}-request to ${2} ($(<"${temperr}"))" >&2; exit 1; fi
rm -f "${temperr}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment