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.
39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
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 ~/Downloads
|
|
#Download from github
|
|
wget https://github.com/SpacingBat3/nativefier-discord-arm/raw/master/assets/discord-linux-armv7l.tar.gz || error 'Failed to download files!'
|
|
#Delete tar.gz and move to /usr/share
|
|
tar -xf discord-linux-armv7l.tar.gz || error 'Failed to extract program!'
|
|
rm discord-linux-armv7l.tar.gz
|
|
sudo mv discord-linux-armv7l /usr/share/ || error 'Failed to move folder!'
|
|
|
|
#Create desktop shortcut
|
|
echo "[Desktop Entry]
|
|
Version=1.0
|
|
Terminal=false
|
|
Type=Application
|
|
Name=Discord
|
|
Exec=/usr/share/discord-linux-armv7l/discord
|
|
Icon=/home/pi/pi-apps/apps/Discord/icon-64.png
|
|
Categories=Network;Chat;VideoConference;WebApp;Internet
|
|
Comment=Your place to talk!
|
|
Comment[pl]=Twoje miejsce do rozmów!
|
|
GenericName=Network Messenger
|
|
GenericName[pl]=Kommunikator internetowy" > /usr/share/discord-linux-armv7l/discord.desktop
|
|
|
|
sudo chmod +x /usr/share/discord-linux-armv7l/discord.desktop
|
|
|
|
#menu button
|
|
sudo cp -a /usr/share/discord-linux-armv7l/discord.desktop ~/.local/share/applications
|
|
|
|
#desktop shortcut
|
|
sudo cp -a /usr/share/discord-linux-armv7l/discord.desktop ~/Desktop/
|