Skip to content

Commit

Permalink
fix: adding some thens
Browse files Browse the repository at this point in the history
  • Loading branch information
pabera committed Jan 12, 2024
1 parent 3abef5f commit 61aa460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions installation/components/setup_hifiberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} <status> <hifiberry-board>[optional]
where <status> can be 'enable' or 'disable'"
exit 1
fi

if [ "$1" != "enable" ];
if [ "$1" != "enable" ]; then
case "$2" in
"${hifiberry_map[@]}")
return 0;;
Expand Down

0 comments on commit 61aa460

Please sign in to comment.