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