diff --git a/mpt b/mpt index c2f6ee6..93c40be 100644 --- a/mpt +++ b/mpt @@ -1,5 +1,5 @@ #!/bin/sh -cd "$(dirname "$0")" +cd "$(dirname "$0")" || exit case $1 in install) if ! [ -d "$HOME/.mpt" ]; @@ -12,6 +12,16 @@ install) curl $dl --output $HOME/.mpt/mpt.jar 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" ]; then mkdir .mpt