diff options
-rw-r--r-- | download.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/download.sh b/download.sh index 9b3da10..4e3c794 100644 --- a/download.sh +++ b/download.sh @@ -9,6 +9,11 @@ download() echo -n " " wget -nc -q --show-progress --progress=dot "$url" 2>&1 | grep --line-buffered "%" | \ sed -u -e "s,\.,,g" | awk '{printf("\b\b\b\b%4s", $2)}' + local retval="${PIPESTATUS[0]}" + if [ "${retval}" -ne 0 ]; then + printf "%b" "${RED}FAILED! WGET EXIT (${retval})\n${RST}" + exit "${retval}" + fi printf "%b" "\b\b\b\b\n" tput cnorm } |