1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 06:16:09 -04:00

force install

This commit is contained in:
v2ray 2016-05-25 12:32:53 +02:00
parent f48f51c6b4
commit e9f0eea0d1

View File

@ -13,6 +13,10 @@ case $key in
HELP="1"
shift
;;
-f|--force)
FORCE="1"
shift
;;
*)
# 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)"
if [[ "$VER" == "$CUR_VER" ]]; then
if [[ "$VER" == "$CUR_VER" ]] && [[ "$FORCE" != "1" ]]; then
echo "Lastest version $VER is already installed. Exiting..."
exit
fi