Update install-release.sh

pull/1045/head
sunshineplan 7 years ago committed by GitHub
parent 7f78775ebe
commit adcdad368f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save