mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-13 20:32:05 +08:00
@@ -29,7 +29,7 @@ function create_desktop_file() {
|
|||||||
}
|
}
|
||||||
function exec_create_desktop_file() {
|
function exec_create_desktop_file() {
|
||||||
local user=$(who | awk '{print $1}' | head -n 1)
|
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
|
if [ "$(cat $desktop_file_path | grep NoDisplay=true)" = "" ];then
|
||||||
echo $desktop_file_path is checked and will be installed to desktop
|
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)/"
|
sudo -u "$user" cp "$desktop_file_path" "$(sudo -u "$user" xdg-user-dir DESKTOP)/"
|
||||||
|
|||||||
Reference in New Issue
Block a user