Skip to content

Instantly share code, notes, and snippets.

@clsource
Created February 15, 2025 11:39
Show Gist options
  • Save clsource/576afd9fcdba4ef4080f2013fad5d606 to your computer and use it in GitHub Desktop.
Save clsource/576afd9fcdba4ef4080f2013fad5d606 to your computer and use it in GitHub Desktop.
Debian 12 Discord Updater Script
#!/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