feat: auto use latest version

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-07-10 00:18:34 +08:00
parent 8bb6eb6f8c
commit 1ed838f3d4

View File

@ -41,6 +41,8 @@ info "=============================="
if [[ ! -f "OneKeyTera.sh" || ! -f ".lock" || $(cat .lock) -lt $(($(date +%s) - 86400)) ]]; then if [[ ! -f "OneKeyTera.sh" || ! -f ".lock" || $(cat .lock) -lt $(($(date +%s) - 86400)) ]]; then
info "更新脚本..." info "更新脚本..."
curl -o OneKeyTera.sh https://git.yumc.pw/cloud/script/raw/master/tera/run.sh curl -o OneKeyTera.sh https://git.yumc.pw/cloud/script/raw/master/tera/run.sh
bash OneKeyTera.sh
exit 0
fi fi
echo $(date +%s) > .lock echo $(date +%s) > .lock
info "程序将在 3秒 后运行... Ctrl + C 取消运行..." info "程序将在 3秒 后运行... Ctrl + C 取消运行..."