mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
force install
This commit is contained in:
parent
f48f51c6b4
commit
e9f0eea0d1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user