diff --git a/tool/ssaudit b/tool/ssaudit index f1c2a97..a20e02c 100755 --- a/tool/ssaudit +++ b/tool/ssaudit @@ -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)/"