Fixed tlauncher not launching and added a warning at the README.md
This commit is contained in:
13
README.md
13
README.md
@@ -1,24 +1,23 @@
|
||||
# TLauncher
|
||||
This is a repo that i made to install TLauncher on Arch Linux directly from their [site](https://tlauncher.org/).
|
||||
|
||||
### Warning !
|
||||
This script is only a tool to facilitate the download of TLauncher. The use of TLauncher is entirely at your own risk. I am not responsible for any issues that may arise from the use of TLauncher. If you are curious about why this warning even exists, see [this](https://github.com/MatheusTT/tlauncher-arch/issues/1) issue.
|
||||
|
||||
## How to install
|
||||
|
||||
1. Clone and enter the repo
|
||||
```c
|
||||
```bash
|
||||
git clone https://github.com/MatheusTT/tlauncher-arch.git && cd tlauncher-arch
|
||||
```
|
||||
2. Change the permissions of the script
|
||||
```c
|
||||
```bash
|
||||
chmod +x ./install.sh
|
||||
```
|
||||
3. Install tlauncher
|
||||
```c
|
||||
```bash
|
||||
./install.sh
|
||||
```
|
||||
## Or you can simply do this:
|
||||
```c
|
||||
wget https://pastebin.com/raw/TUgwsQdx -O - | tr -d '\r' | sh
|
||||
```
|
||||
|
||||
## Usage
|
||||
After the installation, you can just type `tlauncher` in the terminal to launch tlauncher.
|
||||
|
||||
14
install.sh
14
install.sh
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
||||
|
||||
@@ -11,13 +11,13 @@ END="\033[0m"
|
||||
## (They use java 8, but instead i'm installing the most recent java version).
|
||||
# Downloading packages
|
||||
pkgs=(
|
||||
wget
|
||||
jdk-openjdk
|
||||
jre-openjdk
|
||||
jre-openjdk-headless
|
||||
java-openjfx
|
||||
wget
|
||||
jdk-openjdk
|
||||
jre-openjdk
|
||||
jre-openjdk-headless
|
||||
java-openjfx
|
||||
)
|
||||
sudo pacman -S --noconfirm --needed "${pkgs[@]}"
|
||||
sudo pacman -Sy --noconfirm --needed "${pkgs[@]}"
|
||||
|
||||
# Downloading TLauncher
|
||||
echo -e "\n${GREEN}Downloading TLauncher...${END}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
||||
|
||||
@@ -7,6 +7,16 @@ RED="\033[1;31m"
|
||||
GREEN="\033[1;32m"
|
||||
END="\033[0m"
|
||||
|
||||
usage() {
|
||||
echo "
|
||||
Usage:
|
||||
-h, --help, help | Print this message
|
||||
-u, --update, update | Update tlauncher.jar
|
||||
-r, --remove, remove | Remove tlauncher from your system, except your \$HOME/.minecraft dir
|
||||
nothing | Launch TLauncher
|
||||
"
|
||||
}
|
||||
|
||||
update() {
|
||||
echo -e "\n${GREEN}Downloading the latest version...${END}"
|
||||
wget https://tlauncher.org/jar -P /tmp
|
||||
@@ -17,15 +27,6 @@ update() {
|
||||
echo -e "\n${GREEN}Done!${END}"
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "
|
||||
Usage:
|
||||
--update, update | Update tlauncher.jar
|
||||
--remove, remove | Remove tlauncher from your system, except your \$HOME/.minecraft dir
|
||||
nothing | Launch TLauncher
|
||||
"
|
||||
}
|
||||
|
||||
remove() {
|
||||
SYSTEM_FILES=(
|
||||
/usr/share/tlauncher
|
||||
@@ -41,15 +42,21 @@ remove() {
|
||||
[[ "${KEEP_DOTDIR,,}" = "n" ]] && rm -rf "$HOME/.tlauncher"
|
||||
}
|
||||
|
||||
launch() {
|
||||
java -jar /usr/share/tlauncher/tlauncher.jar
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-u|--update|update)
|
||||
update ; exit ;;
|
||||
-r|--remove|remove)
|
||||
remove ; exit ;;
|
||||
*)
|
||||
usage ; exit ;;
|
||||
-u | --update | update)
|
||||
update && exit
|
||||
;;
|
||||
-r | --remove | remove)
|
||||
remove && exit
|
||||
;;
|
||||
-h | --help | help)
|
||||
usage && exit
|
||||
;;
|
||||
*)
|
||||
launch
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
java -jar /usr/share/tlauncher/tlauncher.jar
|
||||
|
||||
Reference in New Issue
Block a user