Skip to content

Commit

Permalink
chirpotle: Update flash command to spot missing firemware argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Hermann Leinweber committed Nov 20, 2023
1 parent 855a628 commit 46d0d59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chirpotle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ function chirpotle_flash {
exit 0
;;
*)
# This is only called if manadatory argument exists. We need to check if firmware value is set after argument parsing.
if [[ "$FIRMWARE" == "" ]]; then
FIRMWARE="$1"
shift
Expand All @@ -450,6 +451,11 @@ function chirpotle_flash {
;;
esac
done

if [[ "$FIRMWARE" == "" ]]; then
echo "No firmware specified. Abort flash." >&2
echo "Call chirpotle.sh flash --help for usage information." >&2
fi

# Enter virtual environment
source "$ENVDIR/bin/activate"
Expand Down

0 comments on commit 46d0d59

Please sign in to comment.