Figured out a way to update tlauncher, and update README.md

This commit is contained in:
Matheus Teixeira Tomaz
2021-11-04 13:01:05 -03:00
parent 236c694b84
commit 6b7fc53e3f
2 changed files with 35 additions and 10 deletions

View File

@@ -1,13 +1,18 @@
# TLauncher
This is a repo that i made to install TLauncher on Arch Linux directly from their [site](https://tlauncher.org/), but i didn't figure it out yet how to update TLauncher.
This is a repo that i made to install TLauncher on Arch Linux directly from their [site](https://tlauncher.org/).
## How to install
1.
1. Change the permissions of the script
```c
chmod +x ./install.sh
```
2.
2. Install tlauncher
```c
./install.sh
```
## Usage
After the installation, you can just type `tlauncher` in the terminal to launch tlauncher.
If you wanna update type `tlauncher --update` or `tlauncher -u`, for downloading the last version of tlauncher _(It's not the best way of doing this, but it will do it for now)_.

View File

@@ -1,2 +1,22 @@
#!/bin/bash
function update() {
wget https://tlauncher.org/jar -P /tmp
unzip /tmp/jar -d /tmp/tlauncher
sudo mv /tmp/tlauncher/*.jar /usr/share/tlauncher/tlauncher.jar
rm /tmp/jar
rm -rf /tmp/tlauncher/
}
while [[ "$1" ]]; do
case "$1" in
"--update" | "-u")
update
;;
*)
java -jar /usr/share/tlauncher/tlauncher.jar
;;
esac
shift
done