File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ sh build.sh <command> [target]
77
88Commands:
99 help|usage|-h|--help: Shows this message.
10+ list|-l: List firmwares available to build.
1011 build-firmware <target>: Build the firmware for the given build target.
1112 build-firmwares: Build all firmwares for all targets.
1213 build-matching-firmwares <build-match-spec>: Build all firmwares for build targets containing the string given for <build-match-spec>.
@@ -46,20 +47,24 @@ $ sh build.sh build-firmware RAK_4631_repeater
4647EOF
4748}
4849
50+ # get a list of pio env names that start with "env:"
51+ get_pio_envs () {
52+ pio project config | grep ' env:' | sed ' s/env://'
53+ }
54+
4955# Catch cries for help before doing anything else.
5056case $1 in
5157 help|usage|-h|--help)
5258 global_usage
5359 exit 1
5460 ;;
61+ list|-l)
62+ get_pio_envs
63+ exit 0
64+ ;;
5565esac
5666
5767
58- # get a list of pio env names that start with "env:"
59- get_pio_envs () {
60- echo $( pio project config | grep ' env:' | sed ' s/env://' )
61- }
62-
6368# $1 should be the string to find (case insensitive)
6469get_pio_envs_containing_string () {
6570 shopt -s nocasematch
You can’t perform that action at this time.
0 commit comments