Commit 2f9c639c authored by Simon Ruderich's avatar Simon Ruderich

simplify check for empty file

parent d6d11a75
......@@ -49,7 +49,7 @@ _request() {
elif [ "${1}" = "post" ]; then
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
if [ -s "${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