mirror of
				https://gitee.com/spark-store-project/spark-store
				synced 2025-11-04 08:12:21 +08:00 
			
		
		
		
	update tool/ssinstall.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
		
							parent
							
								
									43528f4533
								
							
						
					
					
						commit
						d8e7883137
					
				@ -34,13 +34,13 @@ 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 /usr/share/applications/ | awk '/\.desktop$/ {print}'); do
 | 
					    for desktop_file_path in $(dpkg -L "$package_name" |grep /usr/share/applications/ | awk '/\.desktop$/ {print}'); do
 | 
				
			||||||
	if [ "$(grep -m 1 '^NoDisplay=' "$desktop_file_path" | cut -d '=' -f 2)" = "true" ] ||  [ "$(grep -m 1 '^NoDisplay=' "$desktop_file_path" | cut -d '=' -f 2)" = "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)/"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
	for desktop_file_path in $(dpkg -L "$package_name" |grep /opt/apps/$package_name/entries/applications | awk '/\.desktop$/ {print}'); do
 | 
						for desktop_file_path in $(dpkg -L "$package_name" |grep /opt/apps/$package_name/entries/applications | awk '/\.desktop$/ {print}'); do
 | 
				
			||||||
	if [ "$(grep -m 1 '^NoDisplay=' "$desktop_file_path" | cut -d '=' -f 2)" = "true" ] ||  [ "$(grep -m 1 '^NoDisplay=' "$desktop_file_path" | cut -d '=' -f 2)" = "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
 | 
				
			||||||
        chmod +x $desktop_file_path
 | 
					        chmod +x $desktop_file_path
 | 
				
			||||||
        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)/"
 | 
				
			||||||
@ -50,6 +50,7 @@ function exec_create_desktop_file() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function zenity() {
 | 
					function zenity() {
 | 
				
			||||||
    local user=$(who | awk '{print $1}' | head -n 1)
 | 
					    local user=$(who | awk '{print $1}' | head -n 1)
 | 
				
			||||||
    local uid=$(id -u "$user")
 | 
					    local uid=$(id -u "$user")
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user