From 67f8b14ff68a3666d4e0e1df630960f1a0c07027 Mon Sep 17 00:00:00 2001 From: cysamurai Date: Tue, 14 Apr 2026 15:00:30 +0800 Subject: [PATCH] 1 --- scripts/build-linux-deb-all.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/build-linux-deb-all.sh b/scripts/build-linux-deb-all.sh index 0c96c97..c17c67c 100644 --- a/scripts/build-linux-deb-all.sh +++ b/scripts/build-linux-deb-all.sh @@ -28,6 +28,7 @@ OUTPUT_ROOT="$REPO_ROOT/dist/linux-deb" ARM64_PKGCONFIG_DIR="/usr/lib/aarch64-linux-gnu/pkgconfig" X64_PKGCONFIG_DIR="/usr/lib/x86_64-linux-gnu/pkgconfig" AVAILABLE_PROJECTS=() +POSITIONAL_ARGS=() usage() { cat < 0)); do case "$1" in --arch) @@ -102,7 +104,7 @@ parse_args() { esac if (($# > 0)); then - printf '%s\n' "$@" + POSITIONAL_ARGS=("$@") fi } @@ -266,8 +268,8 @@ select_projects() { } main() { - local -a positional to_build - mapfile -t positional < <(parse_args "$@") + local -a to_build + parse_args "$@" mapfile -t AVAILABLE_PROJECTS < <(discover_projects) if (( ${#AVAILABLE_PROJECTS[@]} == 0 )); then echo "错误: 未发现可构建项目(需包含 build:deb:x64 与 build:deb:arm64 脚本)" >&2 @@ -279,7 +281,7 @@ main() { return fi - mapfile -t to_build < <(select_projects "${positional[@]}") + mapfile -t to_build < <(select_projects "${POSITIONAL_ARGS[@]}") mkdir -p "$OUTPUT_ROOT" for p in "${to_build[@]}"; do