shlib.sh: set -e friendly