From b76acbe22737af92a5ced3368af783f93261f8a5 Mon Sep 17 00:00:00 2001 From: jim800121chen Date: Sat, 18 Apr 2026 23:40:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(local-tool):=20build-appimage.sh=20wheel=20?= =?UTF-8?q?=E6=AA=A2=E6=9F=A5=E6=94=B9=E7=94=A8=20grep=20-i=20=E4=B8=8D?= =?UTF-8?q?=E5=88=86=E5=A4=A7=E5=B0=8F=E5=AF=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上一輪誤把關鍵字寫成 'kp',但 wheel 檔名是 'KneronPLUS-2.0.0-*.whl', shell glob *kp*.whl 匹配不到,導致即使 wheel 實際存在仍 exit 1。 改用 ls | grep -i 不分大小寫比對「KneronPLUS」,同時更正錯誤訊息 從「kp wheel」改為「KneronPLUS wheel」。 Co-Authored-By: Claude Opus 4.7 (1M context) --- local-tool/installer/linux/build-appimage.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/local-tool/installer/linux/build-appimage.sh b/local-tool/installer/linux/build-appimage.sh index 8e236d6..cf721cd 100755 --- a/local-tool/installer/linux/build-appimage.sh +++ b/local-tool/installer/linux/build-appimage.sh @@ -103,9 +103,10 @@ if [ "$wheel_count" -lt 4 ]; then fi # 驗證關鍵 wheel 名稱存在(避免只下載到其他 wheel 卻缺 kp 等) +# 大小寫不敏感:KneronPLUS wheel 檔名是大寫開頭,pip 下載的是小寫 missing=() -for pkg in numpy opencv pyusb kp; do - if ! ls "$PAYLOAD_LINUX/wheels/"*${pkg}*.whl >/dev/null 2>&1; then +for pkg in numpy opencv pyusb KneronPLUS; do + if ! ls "$PAYLOAD_LINUX/wheels/" 2>/dev/null | grep -iq "$pkg"; then missing+=("$pkg") fi done @@ -113,7 +114,7 @@ if [ ${#missing[@]} -gt 0 ]; then echo "❌ 缺少關鍵 wheel:${missing[*]}" echo " 目前 wheels 目錄內容:" ls -1 "$PAYLOAD_LINUX/wheels/" 2>/dev/null | sed 's/^/ /' - echo " kp wheel 需手動放到 visiona-local/wheels/linux/(KneronPLUS SDK 非公開套件)" + echo " KneronPLUS wheel 需手動放到 visiona-local/wheels/linux/(非公開套件)" exit 1 fi