Skip to content

Commit

Permalink
Merge pull request #9 from leinher/main
Browse files Browse the repository at this point in the history
chirpotle: Update flash command to spot missing firemware argument
  • Loading branch information
fhessel committed Nov 27, 2023
2 parents 855a628 + 46d0d59 commit 05de650
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 05de650

Please sign in to comment.