From 4a30d4d560b6771f6664dbae1e0ece519ed6e6e2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 1 Jun 2025 20:14:58 +1200 Subject: [PATCH] 'Generic Commit' --- src/dropshell-build | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/dropshell-build b/src/dropshell-build index 6e0fbc2..c79dd12 100755 --- a/src/dropshell-build +++ b/src/dropshell-build @@ -206,7 +206,7 @@ function buildspawn() { else echo "Using local native buildchain" # shellcheck disable=SC2086 - build $FLAGS $CMAKE_DIR + build "$CMAKE_DIR" fi } @@ -216,25 +216,30 @@ function buildspawn() { # ---------------------------------------------------------------------------------------------------------- function main() { - while getopts "rm" opt; do - case $opt in - r) + # Process arguments manually to support long options + while [[ $# -gt 0 ]]; do + case $1 in + -r|--release) RELEASE=1 + shift ;; - m) + -m|--multi) MULTIBUILD=1 + shift ;; - *) + -*) + echo "Unknown option: $1" help exit 1 ;; + *) + # This is not an option, so break from the loop + break + ;; esac done - # Shift the processed options out of the argument list - shift $((OPTIND-1)) - - # check we have at least one argument + # check we have at least one argument remaining if [ $# -eq 0 ]; then help exit 1