Update script
This commit is contained in:
parent
19b2a90b2e
commit
69502e5f7c
12
mpt
12
mpt
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")" || exit
|
||||||
case $1 in
|
case $1 in
|
||||||
install)
|
install)
|
||||||
if ! [ -d "$HOME/.mpt" ];
|
if ! [ -d "$HOME/.mpt" ];
|
||||||
|
@ -12,6 +12,16 @@ install)
|
||||||
curl $dl --output $HOME/.mpt/mpt.jar
|
curl $dl --output $HOME/.mpt/mpt.jar
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
update)
|
||||||
|
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
||||||
|
echo Downloading $dl ...
|
||||||
|
if [ -f "$HOME/.mpt/mpt.jar" ]
|
||||||
|
then
|
||||||
|
curl $dl --output $HOME/.mpt/mpt.jar
|
||||||
|
else
|
||||||
|
curl $dl --output .mpt/mpt.jar
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if ! [ -d ".mpt" ];
|
if ! [ -d ".mpt" ];
|
||||||
then mkdir .mpt
|
then mkdir .mpt
|
||||||
|
|
Loading…
Reference in a new issue