Added a remove option, a one liner to install tlauncher-arch, and formatted some files
This commit is contained in:
26
install.sh
26
install.sh
@@ -1,31 +1,33 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
||||
|
||||
# Colors
|
||||
GREEN="\033[1;32m"
|
||||
END="\033[0m"
|
||||
|
||||
## wget is for downloading TLuncher directly from their website.
|
||||
## All the other packages are java packages recommended by TLauncher
|
||||
## (They use java 8, but instead i'm installing the most recent java version).
|
||||
pkgs_needed=(
|
||||
# Downloading packages
|
||||
pkgs=(
|
||||
wget
|
||||
jdk-openjdk
|
||||
jre-openjdk
|
||||
jre-openjdk-headless
|
||||
java-openjfx
|
||||
)
|
||||
|
||||
for pkg in ${pkgs_needed[@]} ; do
|
||||
if ( ! pacman -Qs | grep -q $pkg ) ; then
|
||||
sudo pacman -S --noconfirm "$pkg"
|
||||
fi
|
||||
done
|
||||
sudo pacman -S --noconfirm --needed "${pkgs[@]}"
|
||||
|
||||
# Downloading TLauncher
|
||||
echo -e "\n\033[1;32mDownloading TLauncher...\033[0m"
|
||||
echo -e "\n${GREEN}Downloading TLauncher...${END}"
|
||||
|
||||
sudo wget https://tlauncher.org/jar -P src/
|
||||
wget https://tlauncher.org/jar -P src/
|
||||
unzip src/jar -d src/tlauncher.d
|
||||
mv src/tlauncher.d/*.jar src/tlauncher.d/tlauncher.jar
|
||||
|
||||
# Moving TLauncher files
|
||||
echo -e "\n\033[1;32mInstalling TLauncher...\033[0m"
|
||||
echo -e "\n${GREEN}Installing TLauncher...${END}"
|
||||
sudo mkdir /usr/share/tlauncher
|
||||
sudo mv src/tlauncher.d/* /usr/share/tlauncher
|
||||
|
||||
@@ -33,4 +35,4 @@ sudo mv src/tlauncher /usr/bin/
|
||||
sudo mv src/tlauncher.png /usr/share/icons
|
||||
sudo mv src/tlauncher.desktop /usr/share/applications
|
||||
|
||||
echo -e "\n\033[1;32mInstallation Complete!\033[0m"
|
||||
echo -e "\n${GREEN}Installation Complete!${END}"
|
||||
Reference in New Issue
Block a user