Created
February 14, 2023 03:31
-
-
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"
This file contains hidden or 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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discord can be launched directly from the search bar without needing to run it in the terminal. Equal to any other program