From 61aa460bf64645a9794cdba5fc7ef4edb2f403b8 Mon Sep 17 00:00:00 2001 From: pabera <1260686+pabera@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:10:50 +0100 Subject: [PATCH] fix: adding some thens --- installation/components/setup_hifiberry.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installation/components/setup_hifiberry.sh b/installation/components/setup_hifiberry.sh index 689c9a779..1b299cc00 100644 --- a/installation/components/setup_hifiberry.sh +++ b/installation/components/setup_hifiberry.sh @@ -19,15 +19,15 @@ declare -A hifiberry_map=( ) # 1-line installation -if [ $# -ge 1 ]; - if { ([ "$1" != "enable" ] && [ "$1" != "disable" ]) || ([ "$1" -= "enable" ] && [ $# -ge 2 ]); } +if [ $# -ge 1 ]; then + if { ([ "$1" != "enable" ] && [ "$1" != "disable" ]) || ([ "$1" -= "enable" ] && [ $# -ge 2 ]); }; then echo "Error: Invalid provided. Usage: ./${script_name} [optional] where can be 'enable' or 'disable'" exit 1 fi - if [ "$1" != "enable" ]; + if [ "$1" != "enable" ]; then case "$2" in "${hifiberry_map[@]}") return 0;;