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