pass arguments to make in compile.sh

This commit is contained in:
David Holdeman 2024-02-19 22:44:17 -06:00 committed by rusefillc
parent 51eb64d119
commit 2bfcfda41c
1 changed files with 7 additions and 4 deletions

View File

@ -18,11 +18,14 @@ FDIR=$(realpath "$SDIR/..")
# Check for -b flag
if [ "$1" == "-b" ]; then
B="bundle"
MI="$2"
else
MI="$1"
shift
fi
MI="$1"
shift
MAKE_ARGS=$*
# If the user passed a meta-info file
if [ ! -z "$MI" ]; then
# If the file exists relative to the firmware directory, do nothing
@ -68,4 +71,4 @@ cd "$FDIR"
MI=$(realpath --relative-to="$FDIR" "$MI")
source config/boards/common_script_read_meta_env.inc "$MI"
make $B -j$(nproc) -r
make $B -j$(nproc) -r $MAKE_ARGS