nfvbenchvm: abort build on error
[nfvbench.git] / nfvbenchvm / dib / build-image.sh
index 4559bb6..3423140 100755 (executable)
@@ -6,6 +6,9 @@
 # Ubuntu: sudo apt-get -y install python3 python3-venv qemu-utils kpartx
 # CentOS: sudo yum install -y python3 qemu-img kpartx
 
+# Stop on error (see https://wizardzines.com/comics/bash-errors/)
+set -euo pipefail
+
 usage() {
     echo "Usage: $0 [-l] [-g] [-v]"
     echo "   -l    build NFVbench loop VM image"