1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

Merge pull request #1045 from sunshineplan/patch-1

Update install-release.sh
This commit is contained in:
DarienRaymond 2018-04-12 16:21:29 +02:00 committed by GitHub
commit d86e28de5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
# Original source is located at github.com/v2ray/v2ray-core/release/install-release.sh
# If not specify, default meaning of return value:
# 0: Success
# 1: System error
# 2: Application error
# 3: Network error
@ -116,7 +117,7 @@ installSoftware(){
getPMT
if [[ $? -eq 1 ]]; then
colorEcho $YELLOW "The system package manager tool isn't APT or YUM, please install ${COMPONENT} manually."
return 2
return 1
fi
colorEcho $GREEN "Installing $COMPONENT"
if [[ $SOFTWARE_UPDATED -eq 0 ]]; then
@ -129,7 +130,7 @@ installSoftware(){
$CMD_INSTALL $COMPONENT
if [[ $? -ne 0 ]]; then
colorEcho ${RED} "Install ${COMPONENT} fail, please install it manually."
return 2
return 1
fi
return 0
}
@ -224,7 +225,7 @@ copyFile() {
ERROR=`cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/${NAME}" "/usr/bin/v2ray/${NAME}" 2>&1`
if [[ $? -ne 0 ]]; then
colorEcho ${YELLOW} "${ERROR}"
return 2
return 1
fi
return 0
}
@ -367,7 +368,7 @@ checkUpdate(){
main(){
#helping information
[[ "$HELP" == "1" ]] && Help && return
[[ "$CHECK" == "1" ]] && checkUpdate
[[ "$CHECK" == "1" ]] && checkUpdate && return
[[ "$REMOVE" == "1" ]] && remove && return
sysArch