Figured out a way to update tlauncher, and update README.md
This commit is contained in:
23
README.md
23
README.md
@@ -1,13 +1,18 @@
|
|||||||
# TLauncher
|
# 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
|
## How to install
|
||||||
|
|
||||||
1.
|
1. Change the permissions of the script
|
||||||
```c
|
```c
|
||||||
chmod +x ./install.sh
|
chmod +x ./install.sh
|
||||||
```
|
```
|
||||||
2.
|
2. Install tlauncher
|
||||||
```c
|
```c
|
||||||
./install.sh
|
./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)_.
|
||||||
@@ -1,2 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
java -jar /usr/share/tlauncher/tlauncher.jar
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user