mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
added help menu, -h and --help
This commit is contained in:
parent
6d63e5686b
commit
27de71c99f
21
inxi
21
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.1.26
|
#### version: 0.1.27
|
||||||
#### Date: October 28 2008
|
#### Date: October 28 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||||
|
@ -424,7 +424,12 @@ get_parameters()
|
||||||
set_color_scheme "$1"
|
set_color_scheme "$1"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
-h|--help)
|
||||||
|
show_options
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
show_options
|
||||||
error_handler 7 "$1"
|
error_handler 7 "$1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -432,6 +437,20 @@ get_parameters()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show_options()
|
||||||
|
{
|
||||||
|
print_screen_output "$SCRIPT_NAME supports the following options:"
|
||||||
|
print_screen_output "--crap Overrides defective or corrupted distro ID file"
|
||||||
|
print_screen_output "-d --debug Triggers script debugger output."
|
||||||
|
print_screen_output "-v -v[1-9] Script verbosity levels."
|
||||||
|
print_screen_output " --verbose "
|
||||||
|
print_screen_output "-U Autoupdate script. Note: if you installed as root, you"
|
||||||
|
print_screen_output " must be root to update, otherwise user is fine."
|
||||||
|
print_screen_output "--version $SCRIPT_NAME information."
|
||||||
|
print_screen_output "0-99 Sets color scheme to use. This will be changed soon."
|
||||||
|
print_screen_output ""
|
||||||
|
}
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
#### MAIN FUNCTIONS
|
#### MAIN FUNCTIONS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
Loading…
Reference in a new issue