fix(local-tool): build-appimage.sh wheel 檢查改用 grep -i 不分大小寫
上一輪誤把關鍵字寫成 '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) <noreply@anthropic.com>
This commit is contained in:
parent
6c21beb7b6
commit
b76acbe227
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user