Fix: try fix parse dinamic args

This commit is contained in:
zijiren233 2024-06-16 15:16:55 +08:00
parent 91a658c1e0
commit df50b8b13e
2 changed files with 11 additions and 14 deletions

View File

@ -13,10 +13,11 @@ function parseDepArgs() {
web_version="${i#*=}"
shift
;;
*)
return 1
;;
esac
done
echo "$@"
}
function printDepHelp() {

View File

@ -764,13 +764,6 @@ function loadBuildConfig() {
fi
}
function checkArgs() {
if [[ $# -gt 0 ]]; then
echo -e "${COLOR_RED}Invalid option: $*${COLOR_RESET}"
exit 1
fi
}
loadBuildConfig
initHostPlatforms
@ -837,14 +830,17 @@ for i in "$@"; do
host_cxx="${i#*=}"
shift
;;
*)
if declare -f parseDepArgs >/dev/null && parseDepArgs "$i"; then
shift
continue
fi
echo -e "${COLOR_RED}Invalid option: $i${COLOR_RESET}"
exit 1
;;
esac
done
if declare -f parseDepArgs >/dev/null; then
set -- $(parseDepArgs "$@")
fi
checkArgs "$@"
fixArgs
initPlatforms
autoBuild "${platforms}"