Skip to content

Instantly share code, notes, and snippets.

@BlendyDev
Last active August 31, 2023 14:33
Show Gist options
  • Select an option

  • Save BlendyDev/54bca226d3abd34ba06d883176d81a9b to your computer and use it in GitHub Desktop.

Select an option

Save BlendyDev/54bca226d3abd34ba06d883176d81a9b to your computer and use it in GitHub Desktop.
Script to update discord
#!/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
@BlendyDev
Copy link
Author

now requires 0 arguments and downloads the required files into /tmp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment