diff --git a/release/install-release.sh b/release/install-release.sh index 78ff6760..452e2484 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -17,6 +17,7 @@ ZIPFILE="/tmp/v2ray/v2ray.zip" V2RAY_RUNNING=0 VSRC_ROOT="/tmp/v2ray" EXTRACT_ONLY=0 +ERROR_IF_UPTODATE=0 CMD_INSTALL="" CMD_UPDATE="" @@ -72,6 +73,9 @@ while [[ $# > 0 ]];do LOCAL_INSTALL="1" shift ;; + --errifuptodate) + ERROR_IF_UPTODATE="1" + ;; *) # unknown option ;; @@ -408,6 +412,9 @@ main(){ RETVAL="$?" if [[ $RETVAL == 0 ]] && [[ "$FORCE" != "1" ]]; then colorEcho ${BLUE} "Latest version ${NEW_VER} is already installed." + if [[ "${ERROR_IF_UPTODATE}" == "1" ]]; then + return 10 + fi return elif [[ $RETVAL == 3 ]]; then return 3