Created
February 15, 2025 11:39
-
-
Save clsource/576afd9fcdba4ef4080f2013fad5d606 to your computer and use it in GitHub Desktop.
Debian 12 Discord Updater Script
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/bashs | |
# Save it in /usr/local/bin/discord-update | |
# And chmod +x /usr/local/bin/discord-update | |
# Run it when discord ask for updates | |
# URL to check for the latest Discord version for Linux in .deb format | |
update_url="https://discord.com/api/download?platform=linux&format=deb" | |
# Get the actual download URL which contains the version number | |
download_url=$(curl -w "%{url_effective}" -ILSs "$update_url" -o /dev/null) | |
# Download the new version | |
curl -O --progress-bar "$download_url" | |
filename=${download_url##*/} | |
# Install the new version | |
sudo apt-get -y --fix-broken install ./"$filename" | |
rm -rf ./"$filename" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment