mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	Zulip can't be run from the terminal because we were not linking the binary to the bin. The electron-builder used to support this by default but we as we added the afterInstall script it got removed. More info - https://github.com/electron-userland/electron-builder/issues/2682, https://github.com/electron-userland/electron-builder/issues/2689 Fixes #444.
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
# This script runs when user uninstall the debian package.
 | 
						|
# It will remove all the config files and anything which was added by the app.
 | 
						|
 | 
						|
# Remove apt repository source list when user uninstalls Zulip app
 | 
						|
if grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep zulip.list; then
 | 
						|
	sudo apt-key del 69AD12704E71A4803DCA3A682424BE5AE9BD10D9;
 | 
						|
	sudo rm /etc/apt/sources.list.d/zulip.list;
 | 
						|
fi
 | 
						|
 | 
						|
# Get the root user
 | 
						|
if [ $SUDO_USER ];
 | 
						|
	then getSudoUser=$SUDO_USER;
 | 
						|
	else getSudoUser=`whoami`;
 | 
						|
fi
 | 
						|
 | 
						|
# Get the path for Zulip's desktop entry which is created by auto-launch script
 | 
						|
getDesktopEntry=/home/$getSudoUser/.config/autostart/zulip.desktop;
 | 
						|
 | 
						|
# Remove desktop entry if exists
 | 
						|
if [ -f $getDesktopEntry ]; then
 | 
						|
    sudo rm $getDesktopEntry;
 | 
						|
fi
 | 
						|
 | 
						|
# App directory which contains all the config, setting files
 | 
						|
appDirectory=/home/$getSudoUser/.config/Zulip/;
 | 
						|
 | 
						|
if [ -d $appDirectory ]; then
 | 
						|
    sudo rm -rf $appDirectory;
 | 
						|
fi
 | 
						|
 | 
						|
# Delete the link to the binary
 | 
						|
echo 'Removing binary link'
 | 
						|
sudo rm -f '/usr/local/bin/${executable}'; |