Make scripts quit on error

This commit is contained in:
Fierelier 2022-05-10 22:50:49 +02:00
parent 60984157c1
commit 03d1593d42
11 changed files with 11 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
echo $(head -c4 </dev/urandom|xxd -p -u) >"/etc/hostname"
echo "$OPUS_SOURCES" >"/etc/apt/sources.list"
apt -y update

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
apt -y install firmware-nonfree
apt -y autoclean
rm /setup

View File

@ -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}"

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
alias cp="cp --reflink=auto"
export STAGE_INPUT="$1"
export STAGE_OUTPUT="$2"

View File

@ -1,2 +1,3 @@
#!/usr/bin/env bash
set -e
cp --reflink=auto -a "$1" "$2"

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
set -e
export OPUS_ARCH=amd64
export OPUS_LINUX=linux-image-amd64

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
set -e
export OPUS_ARCH=i386
export OPUS_LINUX=linux-image-686

View File

@ -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

View File

@ -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"

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
if [ -d "$1" ]; then
rm -rf "$1"
fi

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
export DISK_IMAGE="$2"
export ROOT_MOUNT="$OPUS_OUTPUT/mount"