Commit d3d78f10 authored by Bela, Daniel's avatar Bela, Daniel
Browse files

adapted original Zoom repo setup to Discord client

# What's this all about?
The chat platform [Discord]( also offers a Linux client. However, they do not provide a Debian-compatible package repository, so that updates to the client have to be manually downloaded from the website, and manually installed via `dpkg` or `apt`. I do not like this, so I searched for way to automate this. The result is the shell script provided in this repository.
# How does it work?
The shell script will create a local apt repository, and add this to the apt repository sources. Additionally, it creates a configuration hook for `apt`, so that the most up to date Discord client package is automatically downloaded everytime you run `apt update`.
# How should I use it?
Download the script, and execute it in a terminal. It needs root privileges, and uses `sudo` to escalate there. Provide your credentials for `sudo` when asked for it, and run `apt update` afterwards.
To install the Discord client run `apt install discord`, if you don't have it installed yet. Any updates will automatically be applied with `apt upgrade`.
# Credits
The idea on how to solve this is not my own one, it comes from an answer about the Zoom client on [Ask Ubuntu]( I just did a little cleanup on the code, and adapted it to Discord.
sudo mkdir -p "${debdir}"
sudo tee "${aptconf}" << EOF
Update {
Pre-Invoke {
"echo 'checking for Discord client updates...'";
"wget --quiet --content-disposition --show-progress --timestamping --directory-prefix='${debdir}' '${discord_deburl}'";
"echo 'done...'";
"cd '${debdir}' && apt-ftparchive packages . > ./Packages";
"cd '${debdir}' && apt-ftparchive release . > ./Release";
sudo tee "${sourceslist}" << EOF
deb [trusted=yes lang=none] "file:${debdir}" ./
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment