Parameter identification and correction
parent
47f73bf301
commit
e3f730b2fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue