Skip to content

Commit

Permalink
优化更新流程
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Dec 2, 2018
1 parent 87a0bb4 commit f795ec3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions multi-v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ checkUpdate(){
VERSION_TEMP_VALUE=$(cat /usr/local/bin/v2ray|grep SHELL_V2RAY|awk 'NR==1'|sed 's/\"//g')
if [[ ! -z $VERSION_TEMP_VALUE ]]; then
CURRENT_VERSION=${VERSION_TEMP_VALUE/*=}
if [[ ! -z $UPDATE_VERSION && $UPDATE_VERSION == $CURRENT_VERSION ]];then
echo -e "multi-v2ray当前版本: $(colorEcho $GREEN $CURRENT_VERSION), 已是指定版本!!!"
IS_LATEST=1
return
fi
if [[ -z $UPDATE_VERSION && $FORCE == 0 && $INSTARLL_WAY != 0 && $LASTEST_VERSION == $CURRENT_VERSION ]]; then
echo -e "multi-v2ray当前版本: $(colorEcho $GREEN $CURRENT_VERSION), 已是最新!!!"
IS_LATEST=1
Expand Down Expand Up @@ -244,9 +249,6 @@ updateProject() {
#更新v2ray bash_completion脚本
cp -f $APP_PATH/v2ray.bash /etc/bash_completion.d/
source /etc/bash_completion.d/v2ray.bash

#替换换行符
sed -i -e 's/\r//g' $APP_PATH/v2ray

#安装/更新V2ray主程序
[[ ${INSTARLL_WAY} != 2 ]] && bash <(curl -L -s https://install.direct/go.sh)
Expand Down

0 comments on commit f795ec3

Please sign in to comment.