Created
July 26, 2021 22:51
-
-
Save belkarx/46dabb95a875f8daa02575f4efeaa35a to your computer and use it in GitHub Desktop.
Install Discord on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#this should technically work in zsh and other popular shells | |
#run with sudo, in the folder you want the source to be extracted in (example: cd ~/Downloads && ./../discordinstall.sh) | |
#make sure to chmod +x before attempting to run | |
DATE=$(date +"%m-%d-%Y") | |
wget "discord.com/api/download?platform=linux&format=tar.gz" --output-document="discord-$DATE.tar.gz" | |
sudo tar -xvzf "discord-$DATE.tar.gz" -C /opt | |
sudo ln -sf /opt/Discord/Discord /usr/bin/Discord | |
echo "[Desktop Entry] | |
Name=Discord | |
StartupWMClass=discord | |
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your deskto> | |
GenericName=Internet Messenger | |
Exec=/usr/bin/Discord | |
Icon=/opt/Discord/discord.png | |
Type=Application | |
Categories=Network;InstantMessaging; | |
Path=/usr/bin | |
" > /usr/share/applications/discord.desktop | |
echo -e "\e[1m\e[36mDiscord is installed\e[0m" | |
#remove discord | |
#rm -r ~/.config/discord | |
#sudo rm -rf /usr/bin/Discord | |
#sudo rm /usr/bin/Discord | |
#sudo rm /usr/share/applications/discord.desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Occasionally discord decides to update and generally that means re-installing it (if you are on Linux) so I wrote a script to automate that process