force install

pull/168/head
v2ray 2016-05-25 12:32:53 +02:00
parent f48f51c6b4
commit e9f0eea0d1
1 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,10 @@ case $key in
HELP="1" HELP="1"
shift shift
;; ;;
-f|--force)
FORCE="1"
shift
;;
*) *)
# unknown option # unknown option
;; ;;
@ -71,7 +75,7 @@ VER="$(curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | g
CUR_VER="$(/usr/bin/v2ray/v2ray -version | head -n 1 | cut -d " " -f2)" CUR_VER="$(/usr/bin/v2ray/v2ray -version | head -n 1 | cut -d " " -f2)"
if [[ "$VER" == "$CUR_VER" ]]; then if [[ "$VER" == "$CUR_VER" ]] && [[ "$FORCE" != "1" ]]; then
echo "Lastest version $VER is already installed. Exiting..." echo "Lastest version $VER is already installed. Exiting..."
exit exit
fi fi