Parameter identification and correction

pull/1/head
Dct Mei 2020-04-12 11:22:09 +08:00
parent 47f73bf301
commit e3f730b2fb
No known key found for this signature in database
GPG Key ID: 50BF8B712DCAD7EA
1 changed files with 138 additions and 143 deletions

View File

@ -12,7 +12,7 @@
# If the script executes incorrectly, go to:
# https://github.com/v2fly/fhs-install-v2ray/issues
identify_the_operating_system_and_architecture() {
# Identify the operating system and architecture
if [[ "$(uname)" == 'Linux' ]]; then
case "$(uname -m)" in
'i386' | 'i686')
@ -86,9 +86,8 @@ identify_the_operating_system_and_architecture() {
echo "error: This operating system is not supported."
exit 1
fi
}
judgment_parameters() {
# Judgment parameters
if [[ "$#" -gt '0' ]]; then
case "$1" in
'--remove')
@ -192,7 +191,6 @@ judgment_parameters() {
;;
esac
fi
}
install_software() {
COMPONENT="$1"
@ -466,10 +464,7 @@ show_help() {
}
main() {
identify_the_operating_system_and_architecture
judgment_parameters
# helping information
# Parameter information
[[ "$HELP" -eq '1' ]] && show_help
[[ "$CHECK" -eq '1' ]] && check_update
[[ "$REMOVE" -eq '1' ]] && remove_v2ray