mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
feat: 完全重构 ssinstall
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user