Update script
This commit is contained in:
parent
9bde193aa5
commit
1d4437baa8
1 changed files with 11 additions and 9 deletions
20
mpt
20
mpt
|
@ -9,33 +9,35 @@ install)
|
||||||
then
|
then
|
||||||
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
||||||
echo Downloading $dl ...
|
echo Downloading $dl ...
|
||||||
curl $dl --output $HOME/.mpt/mpt.jar
|
curl "$dl --output $HOME/.mpt/mpt.jar"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
||||||
echo Downloading $dl ...
|
echo Downloading $dl ...
|
||||||
if [ -f "$HOME/.mpt/mpt.jar" ]
|
if [ -f ".mpt/mpt.jar" ]
|
||||||
then
|
then
|
||||||
curl $dl --output $HOME/.mpt/mpt.jar
|
curl "$dl --output .mpt/mpt.jar"
|
||||||
else
|
else
|
||||||
curl $dl --output .mpt/mpt.jar
|
curl "$dl --output $HOME/.mpt/mpt.jar"
|
||||||
fi
|
fi
|
||||||
|
echo Updating Script
|
||||||
|
curl https://data.tilera.xyz/file/mpt/mpt > mpt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if ! [ -d ".mpt" ];
|
if ! [ -d ".mpt" ];
|
||||||
then mkdir .mpt
|
then mkdir .mpt
|
||||||
fi
|
fi
|
||||||
if [ -f "$HOME/.mpt/mpt.jar" ];
|
if [ -f ".mpt/mpt.jar" ];
|
||||||
then jar=$HOME/.mpt/mpt.jar
|
|
||||||
elif [ -f ".mpt/mpt.jar" ];
|
|
||||||
then jar=.mpt/mpt.jar
|
then jar=.mpt/mpt.jar
|
||||||
|
elif [ -f "$HOME.mpt/mpt.jar" ];
|
||||||
|
then jar=$HOME.mpt/mpt.jar
|
||||||
else
|
else
|
||||||
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest)
|
||||||
echo Downloading $dl ...
|
echo Downloading $dl ...
|
||||||
curl $dl --output .mpt/mpt.jar
|
curl "$dl --output .mpt/mpt.jar"
|
||||||
jar=.mpt/mpt.jar
|
jar=.mpt/mpt.jar
|
||||||
fi
|
fi
|
||||||
java -jar $jar $*
|
java -jar $jar $*
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue