更换安装指令为 aptss

This commit is contained in:
2026-02-19 18:01:16 +08:00
parent d16dec09a6
commit 44a55249db
6 changed files with 27 additions and 27 deletions

View File

@@ -2,18 +2,18 @@
# 检查是否提供了至少一个参数
if [[ $# -eq 0 ]]; then
echo "错误:未提供命令参数。用法: $0 apm <子命令> [参数...]"
echo "错误:未提供命令参数。用法: $0 aptss <子命令> [参数...]"
exit 1
fi
# 严格验证第一个参数必须是 "apm"
if [[ "$1" != "apm" ]]; then
echo "拒绝执行:仅允许执行 'apm' 命令。收到的第一个参数: '$1'"
# 严格验证第一个参数必须是 "aptss"
if [[ "$1" != "aptss" ]]; then
echo "拒绝执行:仅允许执行 'aptss' 命令。收到的第一个参数: '$1'"
exit 1
fi
# 执行 apm 命令(跳过第一个参数 "apm"
/usr/bin/apm "${@:2}" 2>&1
# 执行 aptss 命令(跳过第一个参数 "aptss"
/usr/bin/aptss "${@:2}" 2>&1
exit_code=$?
exit $exit_code

View File

@@ -12,7 +12,7 @@
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/opt/apm-store/extras/shell-caller.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.path">/opt/spark-store/extras/shell-caller.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>