From c0ae7fa5f6b642f2f2531d7e14613a597148dc6e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 22 Aug 2022 15:03:07 +1000 Subject: [PATCH] SITL: examples: sitl-on-hw.sh add -m for more defaults --- libraries/SITL/examples/on-hardware/sitl-on-hw.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libraries/SITL/examples/on-hardware/sitl-on-hw.sh b/libraries/SITL/examples/on-hardware/sitl-on-hw.sh index 329e08b713..88ecb05cba 100755 --- a/libraries/SITL/examples/on-hardware/sitl-on-hw.sh +++ b/libraries/SITL/examples/on-hardware/sitl-on-hw.sh @@ -15,11 +15,11 @@ DEFAULTS_PATH="" EXTRA_HWDEF="" usage() { - echo "Usage: $0 [-v ] [-d DEFAULT_FILEPATH] [-b BOARDNAME]" >&2; + echo "Usage: $0 [-v ] [-d DEFAULT_FILEPATH] [-b BOARDNAME] [-m APPEND_DEFAULTS_PATH" >&2; exit 1; } -while getopts ":v:d:b:" o; do +while getopts ":v:d:b:m:" o; do case "${o}" in v) VEHICLE=${OPTARG} @@ -28,6 +28,9 @@ while getopts ":v:d:b:" o; do d) DEFAULTS_PATH=${OPTARG} ;; + m) + MORE_DEFAULTS_PATH=${OPTARG} + ;; b) BOARD=${OPTARG} ;; @@ -48,6 +51,13 @@ if [ -z "${DEFAULTS_PATH}" ]; then fi fi +if [ ! -z "${MORE_DEFAULTS_PATH}" ]; then + NEW_DEFAULTS_PATH="/tmp/some-defaults.param" + cp "$DEFAULTS_PATH" "$NEW_DEFAULTS_PATH" + cat "$MORE_DEFAULTS_PATH" >> "$NEW_DEFAULTS_PATH" + DEFAULTS_PATH="$NEW_DEFAULTS_PATH" +fi + pushd $ROOTDIR ./waf configure \