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
|
# TLauncher
|
||||||
This is a repo that i made to install TLauncher on Arch Linux directly from their [site](https://tlauncher.org/).
|
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
|
## How to install
|
||||||
|
|
||||||
1. Clone and enter the repo
|
1. Clone and enter the repo
|
||||||
```c
|
```bash
|
||||||
git clone https://github.com/MatheusTT/tlauncher-arch.git && cd tlauncher-arch
|
git clone https://github.com/MatheusTT/tlauncher-arch.git && cd tlauncher-arch
|
||||||
```
|
```
|
||||||
2. Change the permissions of the script
|
2. Change the permissions of the script
|
||||||
```c
|
```bash
|
||||||
chmod +x ./install.sh
|
chmod +x ./install.sh
|
||||||
```
|
```
|
||||||
3. Install tlauncher
|
3. Install tlauncher
|
||||||
```c
|
```bash
|
||||||
./install.sh
|
./install.sh
|
||||||
```
|
```
|
||||||
## Or you can simply do this:
|
|
||||||
```c
|
|
||||||
wget https://pastebin.com/raw/TUgwsQdx -O - | tr -d '\r' | sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
After the installation, you can just type `tlauncher` in the terminal to launch tlauncher.
|
After the installation, you can just type `tlauncher` in the terminal to launch tlauncher.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ pkgs=(
|
|||||||
jre-openjdk-headless
|
jre-openjdk-headless
|
||||||
java-openjfx
|
java-openjfx
|
||||||
)
|
)
|
||||||
sudo pacman -S --noconfirm --needed "${pkgs[@]}"
|
sudo pacman -Sy --noconfirm --needed "${pkgs[@]}"
|
||||||
|
|
||||||
# Downloading TLauncher
|
# Downloading TLauncher
|
||||||
echo -e "\n${GREEN}Downloading TLauncher...${END}"
|
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
|
[[ "$(whoami)" = "root" ]] && echo "Script must be run as a normal user." && exit
|
||||||
|
|
||||||
@@ -7,6 +7,16 @@ RED="\033[1;31m"
|
|||||||
GREEN="\033[1;32m"
|
GREEN="\033[1;32m"
|
||||||
END="\033[0m"
|
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() {
|
update() {
|
||||||
echo -e "\n${GREEN}Downloading the latest version...${END}"
|
echo -e "\n${GREEN}Downloading the latest version...${END}"
|
||||||
wget https://tlauncher.org/jar -P /tmp
|
wget https://tlauncher.org/jar -P /tmp
|
||||||
@@ -17,15 +27,6 @@ update() {
|
|||||||
echo -e "\n${GREEN}Done!${END}"
|
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() {
|
remove() {
|
||||||
SYSTEM_FILES=(
|
SYSTEM_FILES=(
|
||||||
/usr/share/tlauncher
|
/usr/share/tlauncher
|
||||||
@@ -41,15 +42,21 @@ remove() {
|
|||||||
[[ "${KEEP_DOTDIR,,}" = "n" ]] && rm -rf "$HOME/.tlauncher"
|
[[ "${KEEP_DOTDIR,,}" = "n" ]] && rm -rf "$HOME/.tlauncher"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
launch() {
|
||||||
|
java -jar /usr/share/tlauncher/tlauncher.jar
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-u|--update|update)
|
-u | --update | update)
|
||||||
update ; exit ;;
|
update && exit
|
||||||
-r|--remove|remove)
|
;;
|
||||||
remove ; exit ;;
|
-r | --remove | remove)
|
||||||
*)
|
remove && exit
|
||||||
usage ; exit ;;
|
;;
|
||||||
|
-h | --help | help)
|
||||||
|
usage && exit
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
launch
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
java -jar /usr/share/tlauncher/tlauncher.jar
|
|
||||||
|
|||||||
Reference in New Issue
Block a user