Last active
August 31, 2023 14:33
-
-
Save BlendyDev/54bca226d3abd34ba06d883176d81a9b to your computer and use it in GitHub Desktop.
Script to update discord
This file contains hidden or 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
| #!/usr/bin/bash | |
| if [[ $(/usr/bin/id -u) -ne 0 ]]; then | |
| echo "Not running as root" | |
| exit | |
| fi | |
| pkill Discord | |
| cd /tmp | |
| if ls | grep "discupd.tar.gz"; then | |
| rm discupd.tar.gz | |
| fi | |
| curl -L "https://discord.com/api/download/stable?platform=linux&format=tar.gz" >> discupd.tar.gz | |
| rm -rf /opt/discord | |
| tar -xvf discupd.tar.gz -C /opt | |
| mv /opt/Discord /opt/discord | |
| rm discupd.tar.gz |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
now requires 0 arguments and downloads the required files into /tmp