Fixed tlauncher not launching and added a warning at the README.md

This commit is contained in:
MatheusTT
2024-11-16 21:57:42 -03:00
parent 5839bd58d4
commit f8dfcc96b6
3 changed files with 41 additions and 35 deletions

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
@@ -17,7 +17,7 @@ pkgs=(
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}"

View File

@@ -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 ;;
update && exit
;;
-r | --remove | remove)
remove ; exit ;;
remove && exit
;;
-h | --help | help)
usage && exit
;;
*)
usage ; exit ;;
launch
;;
esac
java -jar /usr/share/tlauncher/tlauncher.jar