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.
		
		
		
		
		
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			730 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			26 lines
		
	
	
		
			730 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
 | 
						|
}
 | 
						|
 | 
						|
function download() {
 | 
						|
  curl -s https://api.github.com/repos/SpacingBat3/electron-discord-webapp/releases/latest \
 | 
						|
  | grep "browser_download_url.*arm64.deb" \
 | 
						|
  | cut -d : -f 2,3 \
 | 
						|
  | tr -d \" \
 | 
						|
  | wget -qi -
 | 
						|
}
 | 
						|
 | 
						|
gio trash ~/discord-electron 2> /dev/null
 | 
						|
rm -f ~/.local/share/applications/discord.desktop 2> /dev/null
 | 
						|
 | 
						|
echo "downloading discord-electron..."
 | 
						|
download || error "Failed to download latest release!"
 | 
						|
sudo dpkg -i electron-discord-webapp*arm64.deb || error "Failed to install discord-electron!"
 | 
						|
sudo apt -f install
 | 
						|
rm -f electron-discord-webapp*arm64.deb
 |