I’m tired of seeing the update Discord pop up every week. And getup my knowledge and write a shell script which helps with routine.
Also, I remember that joke:
What is the difference between a software engineer and a lazy person? A lazy person will automate their tasks to save time, while a software engineer will automate their tasks to create more time to automate more tasks.
This blog post will show you how to code a Linux shell script to update Discord one-command line. Link to Github gist – here
To code a Linux shell script to update Discord one-command line, you will need the following:
- A Linux computer
Steps to write update Discord one-command line
- Create a new file and name it
- Open the file in a text editor.
- Add the following lines to the file (or copy from gist):
#!/bin/bash # Go to the cd /tmp # Download the latest Discord source archive wget 'https://discord.com/api/download?platform=linux&format=tar.gz' -O discord.tar.gz # Extract the Discord source archive tar -xzf discord.tar.gz -C /tmp/ # Replace the existing Discord installation with the new one cp -r /tmp/Discord /opt/discord # Remove the old Discord source archive rm /tmp/discord.tar.gz && rm -rf /tmp/Discord/
- Save the file.
- Make the file executable:
chmod +x update_discord.sh
6. To update Discord, simply run the following command:
This script will download the latest Discord source archive, extract it to the
/opt/discord folder, and then replace the existing Discord installation with the new one. It will also remove the old Discord source archive.
Discord is a popular communication platform that is used by millions of people around the world. It is a great way to stay in touch with friends and family, as well as to join communities and chat with people who share your interests.
One of the great things about Discord is that it is very customizable. You can change the look and feel of your Discord client, and you can also create custom bots to automate tasks.
All one-line shell-script in my blog – this page.