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.
		
		
		
		
		
			
		
			
				
	
	
		
			24 lines
		
	
	
		
			755 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			24 lines
		
	
	
		
			755 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-armv7l.tar.xz
 | 
						|
wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.tar.xz || error 'Failed to download!'
 | 
						|
tar -xf WhatsApp-linux-armv7l.tar.xz || error "Failed to extract!"
 | 
						|
rm WhatsApp-linux-armv7l.tar.xz
 | 
						|
mv "WhatsApp-linux-armv7l" WhatsApp
 | 
						|
 | 
						|
#create menu shortcut
 | 
						|
echo "[Desktop Entry]
 | 
						|
Name=WhatsApp
 | 
						|
Type=Application
 | 
						|
Exec=/home/pi/WhatsApp/run-whatsapp
 | 
						|
Icon=/home/pi/WhatsApp/resources/app/icon.png
 | 
						|
Categories=Network;Internet" >  ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!"
 |