This commit is contained in:
2026-06-07 21:58:42 +08:00
parent 910bc1643d
commit f2e2951ca4

View File

@@ -9,12 +9,8 @@ if [ ! -f "$PKG_SCRIPT" ]; then
exit 1
fi
# 自动替换add → add --allow-untrusted
sed -i 's/install) action="add" ;;$/install) action="add --allow-untrusted" ;;/' "$PKG_SCRIPT"
# 自动替换
sed -i 's/^[[:space:]]*action="add"$/ action="add --allow-untrusted"/' "$PKG_SCRIPT"
# 验证是否成功
if grep -q 'add --allow-untrusted' "$PKG_SCRIPT"; then
echo "✅ 成功!已自动在 apk add 后添加 --allow-untrusted 参数"
else
echo "❌ 失败!请检查原脚本格式"
fi
echo "✅ 修改完成!"
grep -n "add --allow-untrusted" "$PKG_SCRIPT"