update
This commit is contained in:
@@ -9,12 +9,8 @@ if [ ! -f "$PKG_SCRIPT" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
||||||
|
|
||||||
# 验证是否成功
|
echo "✅ 修改完成!"
|
||||||
if grep -q 'add --allow-untrusted' "$PKG_SCRIPT"; then
|
grep -n "add --allow-untrusted" "$PKG_SCRIPT"
|
||||||
echo "✅ 成功!已自动在 apk add 后添加 --allow-untrusted 参数"
|
|
||||||
else
|
|
||||||
echo "❌ 失败!请检查原脚本格式"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user