You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			27 lines
		
	
	
		
			915 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			27 lines
		
	
	
		
			915 B
		
	
	
	
		
			Bash
		
	
#!/bin/bash
 | 
						|
 | 
						|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
 | 
						|
 | 
						|
function error {
 | 
						|
  echo -e "\\e[91m$1\\e[39m"
 | 
						|
  exit 1
 | 
						|
}
 | 
						|
 | 
						|
cd $HOME
 | 
						|
rm -f WhatsApp-linux-arm64.tar.xz
 | 
						|
wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!'
 | 
						|
tar -xf WhatsApp-linux-arm64.tar.xz || error "Failed to extract!"
 | 
						|
rm WhatsApp-linux-arm64.tar.xz
 | 
						|
mv "WhatsApp-linux-arm64" WhatsApp
 | 
						|
 | 
						|
#Modify run-whatsapp to remove Service Worker before launching WhatsApp
 | 
						|
echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp
 | 
						|
 | 
						|
#create menu shortcut
 | 
						|
echo "[Desktop Entry]
 | 
						|
Name=WhatsApp
 | 
						|
Type=Application
 | 
						|
Exec=bash /home/pi/WhatsApp/run-whatsapp
 | 
						|
Icon=$(dirname "$0")/icon-64.png
 | 
						|
Categories=Network;Internet" >  ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!"
 |