From 7bfacadcf6d813c497422bfec205a0f5d8014cd8 Mon Sep 17 00:00:00 2001 From: mfgbhatti Date: Fri, 28 Jan 2022 16:43:12 +0000 Subject: [PATCH] bug fixes --- 0-preinstall.sh | 5 +++-- startup.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 1de39c7..263f5d3 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# shellcheck disable=SC1091 +# shellcheck disable=SC1091,SC2001 if [[ -f $(pwd)/setup.conf ]]; then @@ -50,7 +50,8 @@ if [[ "$LAYOUT" ]]; then umount /mnt mount -o "$MOUNTOPTION",subvol=@ "$PART3" /mnt - for y in "${SUBVOLUMES[@]:1}"; do + for _y in "${SUBVOLUMES[@]:1}"; do + y="$(echo "$_y" | sed 's/@//g')" mkdir /mnt/"${y}" done diff --git a/startup.sh b/startup.sh index b09d6cc..af02baf 100644 --- a/startup.sh +++ b/startup.sh @@ -90,8 +90,12 @@ set_btrfs () { # An array is a list of values. NAMES=(@) for i in "${ARR[@]}"; do + if [[ $i =~ [@] ]]; then # push values to array - NAMES+=("$i") + NAMES+=("$i") + else + NAMES+=(@"${i}") + fi done # Set to config file set_option "SUBVOLUMES" "(${NAMES[*]})" @@ -509,7 +513,7 @@ make_choice () { fi done } -background_check +# background_check # write_to_config clear logo