Skip to content

Instantly share code, notes, and snippets.

@apjone
Created January 14, 2026 07:11
Show Gist options
  • Select an option

  • Save apjone/035d0bf75220873c0cd47c97fd9b12f1 to your computer and use it in GitHub Desktop.

Select an option

Save apjone/035d0bf75220873c0cd47c97fd9b12f1 to your computer and use it in GitHub Desktop.
Dirty Discord Update Script
#!/bin/bash
wget "https://discord.com/api/download/stable?platform=linux&format=deb" -O /tmp/discord.deb
new_ver=`dpkg-deb -I /tmp/discord.deb | grep "Version" | awk '{printf $2}' | cut -f3 -d'.'`
curr_ver=`dpkg -l discord | tail -n1 | awk '{printf $3}' | cut -f3 -d'.'`
if ((new_ver > curr_ver)); then
echo "New Version $new_ver replaces $curr_ver"
dpkg -i /tmp/discord.deb
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment