From 03d1593d42a3f737adeef6f25214defabc3f5d13 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 10 May 2022 22:50:49 +0200 Subject: [PATCH] Make scripts quit on error --- input/stage01/setup | 1 + input/stage49/setup | 1 + input/stage99/setupdisk | 1 + path/apply-stage | 1 + path/dupe | 1 + path/env-amd64 | 1 + path/env-i386 | 1 + path/env-proprietary | 1 + path/fchroot | 1 + path/make-base | 1 + path/make-image | 1 + 11 files changed, 11 insertions(+) diff --git a/input/stage01/setup b/input/stage01/setup index edfa86e..84921ac 100755 --- a/input/stage01/setup +++ b/input/stage01/setup @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e echo $(head -c4 "/etc/hostname" echo "$OPUS_SOURCES" >"/etc/apt/sources.list" apt -y update diff --git a/input/stage49/setup b/input/stage49/setup index 1f58e2e..0fdf864 100755 --- a/input/stage49/setup +++ b/input/stage49/setup @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e apt -y install firmware-nonfree apt -y autoclean rm /setup \ No newline at end of file diff --git a/input/stage99/setupdisk b/input/stage99/setupdisk index a2ceb1e..dfb76fc 100755 --- a/input/stage99/setupdisk +++ b/input/stage99/setupdisk @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e apt -y install cloud-utils apt -y autoclean grub-install --boot-directory="/boot" --modules=part_msdos "${DISK_LOOP}" diff --git a/path/apply-stage b/path/apply-stage index 4d08b28..f05e92d 100755 --- a/path/apply-stage +++ b/path/apply-stage @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e alias cp="cp --reflink=auto" export STAGE_INPUT="$1" export STAGE_OUTPUT="$2" diff --git a/path/dupe b/path/dupe index 02b93b1..773ec1c 100755 --- a/path/dupe +++ b/path/dupe @@ -1,2 +1,3 @@ #!/usr/bin/env bash +set -e cp --reflink=auto -a "$1" "$2" \ No newline at end of file diff --git a/path/env-amd64 b/path/env-amd64 index 6f97a7d..802d56a 100755 --- a/path/env-amd64 +++ b/path/env-amd64 @@ -1,3 +1,4 @@ #!/usr/bin/env bash +set -e export OPUS_ARCH=amd64 export OPUS_LINUX=linux-image-amd64 \ No newline at end of file diff --git a/path/env-i386 b/path/env-i386 index fcc59fd..c9bba28 100755 --- a/path/env-i386 +++ b/path/env-i386 @@ -1,3 +1,4 @@ #!/usr/bin/env bash +set -e export OPUS_ARCH=i386 export OPUS_LINUX=linux-image-686 \ No newline at end of file diff --git a/path/env-proprietary b/path/env-proprietary index 8fd2b55..bacb376 100755 --- a/path/env-proprietary +++ b/path/env-proprietary @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e export OPUS_SOURCES="deb http://deb.devuan.org/merged $OPUS_DIST main contrib non-free # deb-src http://deb.devuan.org/merged $OPUS_DIST main contrib non-free diff --git a/path/fchroot b/path/fchroot index ff96a79..ec613fb 100755 --- a/path/fchroot +++ b/path/fchroot @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e mount -o bind "/dev" "$1/dev" mount -o bind "/dev/pts" "$1/dev/pts" mount -o bind "/sys" "$1/sys" diff --git a/path/make-base b/path/make-base index 80444e5..ecf2211 100755 --- a/path/make-base +++ b/path/make-base @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e if [ -d "$1" ]; then rm -rf "$1" fi diff --git a/path/make-image b/path/make-image index d1d0a6c..40f0814 100755 --- a/path/make-image +++ b/path/make-image @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e export DISK_IMAGE="$2" export ROOT_MOUNT="$OPUS_OUTPUT/mount"