Skip to content

Commit

Permalink
fix: line 29 $2 unbound variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-luke committed Sep 3, 2023
1 parent ff4dcc3 commit 59f49f5
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions sd-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@ while [[ $# -gt 0 ]]; do
;;
esac

case $2 in
y)
yes_test=true
shift
;;
n)
yes_test=false
shift
;;
*)
echo_red "Unknown argument: $2"
exit 1
;;
esac
if [[ -n $2 ]]; then
case $2 in
y)
yes_test=true
shift
;;
n)
yes_test=false
shift
;;
*)
echo_red "Unknown argument: $2"
exit 1
;;
esac
fi
done

if $test_mode; then
Expand Down

0 comments on commit 59f49f5

Please sign in to comment.