Correct the output

pull/1/head
Dct Mei 2020-04-12 11:57:44 +08:00
parent 6effa0a0da
commit f30b149b6d
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
1 changed files with 39 additions and 42 deletions

View File

@ -88,7 +88,7 @@ if [[ "$#" -gt '0' ]]; then
case "$1" in
'--remove')
if [[ "$#" -gt '1' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
REMOVE='1'
@ -102,21 +102,21 @@ if [[ "$#" -gt '0' ]]; then
;;
'-c' | '--check')
if [[ "$#" -gt '1' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
CHECK='1'
;;
'-f' | '--force')
if [[ "$#" -gt '1' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
FORCE='1'
;;
'-h' | '--help')
if [[ "$#" -gt '1' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
HELP='1'
@ -149,7 +149,6 @@ if [[ "$#" -gt '0' ]]; then
;;
esac
PROXY="-x $2"
# Parameters available through a proxy server
if [[ "$#" -gt '2' ]]; then
case "$3" in
@ -162,14 +161,14 @@ if [[ "$#" -gt '0' ]]; then
;;
'-c' | '--check')
if [[ "$#" -gt '3' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
CHECK='1'
;;
'-f' | '--force')
if [[ "$#" -gt '3' ]]; then
echo 'error: Please enter the correct command.'
echo 'error: Please enter the correct parameters.'
exit 1
fi
FORCE='1'
@ -226,7 +225,6 @@ get_version() {
return
fi
fi
# Get V2Ray release version number
TMP_FILE="$(mktemp)"
install_software curl
@ -239,7 +237,6 @@ get_version() {
RELEASE_LATEST="$(cat $TMP_FILE | sed 'y/,/\n/' | grep 'tag_name' | awk -F '"' '{print $4}')"
rm "$TMP_FILE"
RELEASE_VERSION="$(version_number $RELEASE_LATEST)"
# Compare V2Ray version numbers
if [[ "$RELEASE_VERSION" != "$CURRENT_VERSION" ]]; then
RELEASE_VERSIONSION_NUMBER="${RELEASE_VERSION#v}"