From 2c3fca45a82cf494f346977c46da84e47a0fb175 Mon Sep 17 00:00:00 2001 From: ene Date: Tue, 21 Mar 2023 16:47:43 +0100 Subject: Fix(bootstrap/install): Update to new shell-library ver --- bootstrap/install/install.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap/install/install.sh b/bootstrap/install/install.sh index 91caa186..ae00c8f8 100755 --- a/bootstrap/install/install.sh +++ b/bootstrap/install/install.sh @@ -2,13 +2,12 @@ # shellcheck disable=SC2086 # shellcheck source=/dev/null . %SHELL_LIBRARY_PATH -export LIB_TEMP_DIR_FOR_SCRIPT="$(mktemp -d)" bsc() { - msg2 "$(btrfs subvolume create "$1" || dien "Creating of subvol $1")"; + msg2 "$(btrfs subvolume create "$1" || die "Creating of subvol $1 failed")"; } mne() { - mount --mkdir --options compress-force=zstd:15,subvol="$1" $DISK_ROOT "$2" || dien "Mounting of $1"; + mount --mkdir --options compress-force=zstd:15,subvol="$1" $DISK_ROOT "$2" || die "Mounting of $1 failed"; } @@ -53,9 +52,9 @@ case $result in ;; esac -sgdisk -Z "/dev/${disk}" > /dev/null|| dien "Zapping" +sgdisk -Z "/dev/${disk}" > /dev/null|| die "Zapping failed" -sgdisk -n 1:0:+550M -n 2:0:"$ENDSECTOR" -t 1:ef00 -t 2:8300 "/dev/${disk}" > /dev/null|| dien "Partitioning" +sgdisk -n 1:0:+550M -n 2:0:"$ENDSECTOR" -t 1:ef00 -t 2:8300 "/dev/${disk}" > /dev/null|| die "Partitioning failed" case "$disk" in "nvme"*) @@ -72,8 +71,8 @@ case "$disk" in esac msg "Started Formatting..." -mkfs.fat -F32 "$DISK_EFI" > /dev/null || dien "Formatting(fat32)" -mkfs.btrfs -f "$DISK_ROOT" > /dev/null || dien "Formatting(btrfs)" +mkfs.fat -F32 "$DISK_EFI" > /dev/null || die "Formatting(fat32) failed" +mkfs.btrfs -f "$DISK_ROOT" > /dev/null || die "Formatting(btrfs) failed" msg "Mounting..." @@ -142,4 +141,3 @@ case $result in exit 1 ;; esac -if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi -- cgit 1.4.1