From 22532e04367eda60db9a98b4e259a71c96953812 Mon Sep 17 00:00:00 2001 From: shenmo Date: Tue, 31 Oct 2023 22:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/ssaudit | 11 +++++------ tool/ssinstall | 7 ++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tool/ssaudit b/tool/ssaudit index b34d870..f1c2a97 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -12,7 +12,7 @@ case $(arch) in ;; esac -echo "Spark Store Install script. 星火商店安装脚本" +echo "Spark Store Install script. 星火商店审核脚本" function pkexec_as_current_user() { local user=$(who | awk '{print $1}' | head -n 1) @@ -20,12 +20,13 @@ function pkexec_as_current_user() { sudo -u "$user" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$uid"/bus pkexec "$@" } function create_desktop_file() { - if [ -e $(sudo -u "$user" xdg-user-dir)/.config/spark-union/spark-store/ssshell-config-do-not-show-upgrade-notify ];then + local user=$(who | awk '{print $1}' | head -n 1) + if [ -e $(sudo -u "$user" xdg-user-dir)/.config/spark-union/spark-store/ssshell-config-do-not-create-desktop ];then echo "It is configured that do not create desktop file. Give up" else - create_desktop_file + exec_create_desktop_file fi -] +} function exec_create_desktop_file() { local user=$(who | awk '{print $1}' | head -n 1) for desktop_file_path in $(dpkg -L "$package_name" | grep .desktop); do @@ -130,5 +131,3 @@ DEBPATH=$(realpath "$1") echo "OMG-IT-GOES-WRONG" fi fi - - diff --git a/tool/ssinstall b/tool/ssinstall index 4c3e90b..4710a1c 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -20,12 +20,13 @@ function pkexec_as_current_user() { sudo -u "$user" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$uid"/bus pkexec "$@" } function create_desktop_file() { - if [ -e $(sudo -u "$user" xdg-user-dir)/.config/spark-union/spark-store/ssshell-config-do-not-show-upgrade-notify ];then + local user=$(who | awk '{print $1}' | head -n 1) + if [ -e $(sudo -u "$user" xdg-user-dir)/.config/spark-union/spark-store/ssshell-config-do-not-create-desktop ];then echo "It is configured that do not create desktop file. Give up" else - create_desktop_file + exec_create_desktop_file fi -] +} function exec_create_desktop_file() { local user=$(who | awk '{print $1}' | head -n 1) for desktop_file_path in $(dpkg -L "$package_name" | grep .desktop); do