update tool/ssinstall.

Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
shenmo 2023-10-31 15:08:36 +00:00 committed by Gitee
parent 5136984343
commit 9f1f21c2b6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -29,7 +29,7 @@ function create_desktop_file() {
}
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
for desktop_file_path in $(dpkg -L "$package_name" | awk '/\.desktop$/ {print}'); do
if [ "$(cat $desktop_file_path | grep NoDisplay=true)" = "" ];then
echo $desktop_file_path is checked and will be installed to desktop
sudo -u "$user" cp "$desktop_file_path" "$(sudo -u "$user" xdg-user-dir DESKTOP)/"