From 1d4437baa828e87b354d52d338545345ae26809e Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Wed, 29 Jul 2020 23:34:44 +0200 Subject: [PATCH] Update script --- mpt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mpt b/mpt index 93c40be..5e3450e 100644 --- a/mpt +++ b/mpt @@ -9,33 +9,35 @@ install) then dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest) echo Downloading $dl ... - curl $dl --output $HOME/.mpt/mpt.jar + 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" ] + if [ -f ".mpt/mpt.jar" ] then - curl $dl --output $HOME/.mpt/mpt.jar + curl "$dl --output .mpt/mpt.jar" else - curl $dl --output .mpt/mpt.jar + curl "$dl --output $HOME/.mpt/mpt.jar" fi + echo Updating Script + curl https://data.tilera.xyz/file/mpt/mpt > mpt ;; *) if ! [ -d ".mpt" ]; then mkdir .mpt fi - if [ -f "$HOME/.mpt/mpt.jar" ]; - then jar=$HOME/.mpt/mpt.jar - elif [ -f ".mpt/mpt.jar" ]; + if [ -f ".mpt/mpt.jar" ]; then jar=.mpt/mpt.jar + elif [ -f "$HOME.mpt/mpt.jar" ]; + then jar=$HOME.mpt/mpt.jar else dl=$(curl https://data.tilera.xyz/file/mpt/mpt-latest) echo Downloading $dl ... - curl $dl --output .mpt/mpt.jar + curl "$dl --output .mpt/mpt.jar" jar=.mpt/mpt.jar fi java -jar $jar $* ;; -esac \ No newline at end of file +esac