Created
June 5, 2024 13:10
-
-
Save nothub/0ecfcd01875beac39a266a4a5aa601e5 to your computer and use it in GitHub Desktop.
discord installer / updater
This file contains 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/env sh | |
set -o errexit | |
set -o nounset | |
f="$(mktemp).deb" | |
curl -Lo "${f}" 'https://discord.com/api/download/stable?platform=linux&format=deb' | |
if ! file "${f}" | grep -F 'Debian binary package' > /dev/null; then | |
echo "file ${f} is no debian binary package" | |
exit 1 | |
fi | |
sudo apt install "${f}" | |
rm -f "${f}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment