From e451619c3798d1edebc23dcb862e0f3a862ec886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 24 May 2022 23:09:19 +0800 Subject: [PATCH] shellcheck step 9 --- hyperfi | 62 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/hyperfi b/hyperfi index 2d37e12..7a82d77 100644 --- a/hyperfi +++ b/hyperfi @@ -814,36 +814,38 @@ installbase(){ done options=() - if [[ "${fspkgs}" == *"dosfstools"* ]]; then - options+=("dosfstools" "" on) - else - options+=("dosfstools" "" off) - fi - if [[ "${fspkgs}" == *"btrfs-progs"* ]]; then - options+=("btrfs-progs" "" on) - else - options+=("btrfs-progs" "" off) - fi - if [[ "${fspkgs}" == *"xfsprogs"* ]]; then - options+=("xfsprogs" "" on) - else - options+=("xfsprogs" "" off) - fi - if [[ "${fspkgs}" == *"f2fs-tools"* ]]; then - options+=("f2fs-tools" "" on) - else - options+=("f2fs-tools" "" off) - fi - if [[ "${fspkgs}" == *"jfsutils"* ]]; then - options+=("jfsutils" "" on) - else - options+=("jfsutils" "" off) - fi - if [[ "${fspkgs}" == *"reiserfsprogs"* ]]; then - options+=("reiserfsprogs" "" on) - else - options+=("reiserfsprogs" "" off) - fi + for value in "${fspkgs[@]}"; do + if [[ "${value}" == *"dosfstools"* ]]; then + options+=("dosfstools" "" on) + else + options+=("dosfstools" "" off) + fi + if [[ "${value}" == *"btrfs-progs"* ]]; then + options+=("btrfs-progs" "" on) + else + options+=("btrfs-progs" "" off) + fi + if [[ "${value}" == *"xfsprogs"* ]]; then + options+=("xfsprogs" "" on) + else + options+=("xfsprogs" "" off) + fi + if [[ "${value}" == *"f2fs-tools"* ]]; then + options+=("f2fs-tools" "" on) + else + options+=("f2fs-tools" "" off) + fi + if [[ "${value}" == *"jfsutils"* ]]; then + options+=("jfsutils" "" on) + else + options+=("jfsutils" "" off) + fi + if [[ "${value}" == *"reiserfsprogs"* ]]; then + options+=("reiserfsprogs" "" on) + else + options+=("reiserfsprogs" "" off) + fi + done options+=("lvm2" "" off) options+=("dmraid" "" off) sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallhyperbolafilesystems}" --checklist "" 0 0 0 \