Skip to content

Commit

Permalink
gs
Browse files Browse the repository at this point in the history
  • Loading branch information
pabera committed Jan 12, 2024
1 parent 00e03ed commit 4ff95a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions installation/components/setup_hifiberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ main() {

# Execute program
if [ $# -ge 1 ]; then
if [[ "$1" != "enable" && "$1" != "disable" ]] || [[ "$1" == "enable" && -z $# -ge 2 ]]; then
if [[ "$1" != "enable" && "$1" != "disable" ]] || [[ "$1" == "enable" &&-z "$2" ]]; then
echo "Error: Invalid arguments provided.
Usage: ./${script_name} <status> <hifiberry-board>
where <status> can be 'enable' or 'disable'.
Expand All @@ -99,11 +99,6 @@ The following board options exist:"
exit 1
fi

if [ "$1" == "disable" ]; then
disable_hifiberry
exit 1
fi

if [ "$1" == "enable" ]; then
case "$2" in
"${hifiberry_map[@]}")
Expand All @@ -115,6 +110,11 @@ The following board options exist:"
;;
esac
fi

if [ "$1" == "disable" ]; then
disable_hifiberry
exit 1
fi
fi

main
Expand Down

0 comments on commit 4ff95a1

Please sign in to comment.