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