diff options
author | ene <ene@sils.li> | 2023-03-21 16:47:43 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-03-21 16:47:43 +0100 |
commit | 2c3fca45a82cf494f346977c46da84e47a0fb175 (patch) | |
tree | 4eacdd3241877cfaed8cb6f904e60d528f8ca9bc /bootstrap | |
parent | Fix(bootstrap/install): Add 'sgdisk' to dependencies (diff) | |
download | nixos-config-2c3fca45a82cf494f346977c46da84e47a0fb175.tar.gz nixos-config-2c3fca45a82cf494f346977c46da84e47a0fb175.zip |
Fix(bootstrap/install): Update to new shell-library ver
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/install/install.sh | 14 |
1 files changed, 6 insertions, 8 deletions
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 |