mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-29 17:20:41 +00:00
build.sh: add list and -l to list firmwares available to build.
This commit is contained in:
15
build.sh
15
build.sh
@@ -7,6 +7,7 @@ sh build.sh <command> [target]
|
||||
|
||||
Commands:
|
||||
help|usage|-h|--help: Shows this message.
|
||||
list|-l: List firmwares available to build.
|
||||
build-firmware <target>: Build the firmware for the given build target.
|
||||
build-firmwares: Build all firmwares for all targets.
|
||||
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
|
||||
EOF
|
||||
}
|
||||
|
||||
# get a list of pio env names that start with "env:"
|
||||
get_pio_envs() {
|
||||
pio project config | grep 'env:' | sed 's/env://'
|
||||
}
|
||||
|
||||
# Catch cries for help before doing anything else.
|
||||
case $1 in
|
||||
help|usage|-h|--help)
|
||||
global_usage
|
||||
exit 1
|
||||
;;
|
||||
list|-l)
|
||||
get_pio_envs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# get a list of pio env names that start with "env:"
|
||||
get_pio_envs() {
|
||||
echo $(pio project config | grep 'env:' | sed 's/env://')
|
||||
}
|
||||
|
||||
# $1 should be the string to find (case insensitive)
|
||||
get_pio_envs_containing_string() {
|
||||
shopt -s nocasematch
|
||||
|
||||
Reference in New Issue
Block a user