feat: 完全重构 ssinstall

This commit is contained in:
2025-06-04 11:49:36 +08:00
parent 963289355c
commit 14720c064c
3 changed files with 455 additions and 129 deletions

View File

@@ -21,6 +21,28 @@ case $(arch) in
esac
echo "Spark Store Install script. 星火商店安装脚本"
parse_args() {
while [ $# -gt 0 ]; do
case "$1" in
-h | --help)
help
exit 0
;;
--delete-after-install)
DELETE_AFTER_INSTALL="1"
shift
;;
*)
DEBPATH="$1"
;;
esac
shift
done
}
parse_args "$@"
# 包含自动识别安装需求和用户交互业务代码
function pkexec_as_current_user() {
local user=$(who | awk '{print $1}' | head -n 1)
@@ -136,6 +158,7 @@ fi
if [ "$(id -u)" != "0" ]; then
echo "${TRANSHELL_CONTENT_PLEASE_RUN_AS_ROOT}"
echo "OMG-IT-GOES-WRONG"