update
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user