In the shell scripts for provisioning in qt5, we have a pattern that is fundamentally wrong.
wget --tries=5 --waitretry=5 --output-document=$targetFile $url || echo "Failed to download '$url' multiple times"
The problem is pretty obvious: set -e is good, then we actively work around it by using the or expression, so in case of errors, we print an error message and continue.
I would recommend "set -x" in addition to "set -e" to make it clear what is going on.
The most important part is of course to get rid of all || echo immediately.