Skip to content

Instantly share code, notes, and snippets.

@y4my4my4m
Created February 14, 2023 03:31
Show Gist options
  • Select an option

  • Save y4my4my4m/9bf14f603da01cdea6a6ee2fdd27069b to your computer and use it in GitHub Desktop.

Select an option

Save y4my4my4m/9bf14f603da01cdea6a6ee2fdd27069b to your computer and use it in GitHub Desktop.
A quick script to install discord for Arch. Sometimes discord need you to install the udpate as a .tar.gz. This script allows you to auto-install it. Just call this script from where you've downloaded the discord-0.0.25.tar.gz file and call it like "sudo discord-install.sh 25"
#!/bin/sh
set -e
if [ -z "$1" ] || ! [ "$1" -eq "$1" ] 2>/dev/null; then
echo "Invalid or missing argument. Please provide a valid number."
exit 1
fi
if sudo rm -rf /opt/Discord; then
echo "Removed old Discord installation."
else
echo "Failed to remove old Discord installation. Aborting."
exit 1
fi
echo "Extracting new Discord installation (version $1)..."
tar xvfz "$(pwd)/discord-0.0.$1.tar.gz"
echo "Moving new Discord installation to /opt..."
sudo mv "$(pwd)/Discord" /opt
@matheusfrancisco

matheusfrancisco commented Aug 23, 2024

Copy link
Copy Markdown

Discord can be launched directly from the search bar without needing to run it in the terminal. Equal to any other program

@y4my4my4m

Copy link
Copy Markdown
Author

@matheusfrancisco good to know, cheers!

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