diff --git a/core.go b/core.go index 716bf2a..9f2381d 100755 --- a/core.go +++ b/core.go @@ -7,7 +7,7 @@ import ( ) // 版本号 -const BuildVersion = "0.3.23" +const BuildVersion = "0.4.0" // 代码页 const ReleaseCodeHome = "https://github.com/ixre/tto" diff --git a/install b/install index 1917148..9e91dc2 100644 --- a/install +++ b/install @@ -1,7 +1,13 @@ #!/usr/bin/env sh -mkdir -p ~/.tto -curl -L https://github.com/ixre/tto/releases/download/v0.3.23/tto-generator-bin.tar.gz | tar xz -C ~/.tto +set -e && mkdir -p ~/.tto +curl -L https://github.com/ixre/tto/releases/download/v0.4.0/tto-generator-bin.tar.gz | tar xz -C ~/.tto + +echo '============================' +echo 'check access..' +sudo -i +echo 'installing...' + GOOS=$(uname) if [ "$GOOS" = 'Darwin' ]; then sudo mv ~/.tto/mac-tto /usr/local/bin/tto @@ -12,7 +18,8 @@ elif [ "$GOOS" = 'Windows' ] || \ else sudo mv ~/.tto/tto /usr/local/bin fi -rm -rf ~/.tto && echo "恭喜,安装成功!" + +rm -rf ~/.tto && echo "install finished!"