mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-07 17:33:45 +02:00
Add help and version messages
This commit is contained in:
parent
56e15eb77a
commit
d821c49625
1 changed files with 22 additions and 2 deletions
24
updater.sh
24
updater.sh
|
@ -15,6 +15,7 @@ QUIET="false"
|
||||||
VERBOSE="false"
|
VERBOSE="false"
|
||||||
FORCE_VERSION="false"
|
FORCE_VERSION="false"
|
||||||
UPDATED="false"
|
UPDATED="false"
|
||||||
|
VERSION="1.4"
|
||||||
|
|
||||||
# Prints a message to the standard error and exit with error code 1.
|
# Prints a message to the standard error and exit with error code 1.
|
||||||
error() {
|
error() {
|
||||||
|
@ -57,12 +58,31 @@ update_installer() {
|
||||||
|
|
||||||
# Prints to the standard output the help message.
|
# Prints to the standard output the help message.
|
||||||
show_help() {
|
show_help() {
|
||||||
echo "ciao"
|
show_version
|
||||||
|
cat <<-_EOF
|
||||||
|
Usage:
|
||||||
|
$PROGRAM [--update,-u] [--verbose] [--quiet,-q] [--force-version,-f]
|
||||||
|
[--help,-h] [--version,-v]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-u, --update First updates the updater script, then the user.js
|
||||||
|
--force-version, -f Force to download the user.js according to the
|
||||||
|
Firefox version
|
||||||
|
--quiet, -q Print only errors
|
||||||
|
--verbose Print additional informations
|
||||||
|
--help Print this message
|
||||||
|
--version Print script version
|
||||||
|
|
||||||
|
Please note that it is not given the option '--force-version' this script will
|
||||||
|
download the latest version available, that can be unstable.
|
||||||
|
|
||||||
|
Please report bugs to https://github.com/ghacksuserjs/ghacks-user.js/issues
|
||||||
|
_EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prints to the standard output the version of this script.
|
# Prints to the standard output the version of this script.
|
||||||
show_version() {
|
show_version() {
|
||||||
echo "$PROGRAM version 1.4"
|
echo "$PROGRAM for ghacks-user.js version $VERSION"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Updates the user.js.
|
# Updates the user.js.
|
||||||
|
|
Loading…
Add table
Reference in a new issue