sequencer - update help api

This commit is contained in:
2022-05-29 23:01:06 +02:00
parent 55a9243b57
commit 89c9e43979

View File

@@ -149,7 +149,7 @@ sequencer.sh global variables:
1 - Show time stamps before log outputs
\${sqr_args}
String of all given options
\$SEQ_CONFIG_HOME
\${seq_configRoot}
Path to user specific seq configuration directory
\${seq_configFile}
Path to user specific seq configuration file
@@ -161,10 +161,14 @@ sequencer.sh build-in functions:
USAGE_API
echo -e "${col_green} root${col_off}"
cat <<USAGE_API
Returns true if current user is root.
e.g. root || echo "Not root"
USAGE_API
echo -e "${col_green} running${col_off}"
cat <<USAGE_API
Returns true if same script already runs.
e.g. running && exit 1
USAGE_API
echo -e "${col_green} exists [OPTIONS] [ELEMENT]${col_off}"
@@ -177,26 +181,32 @@ USAGE_API
USAGE_API
echo -e "${col_green} quiet${col_off}"
cat <<USAGE_API
Returns true if seq runs non-interactive (-q|-qq).
USAGE_API
echo -e "${col_green} silent${col_off}"
cat <<USAGE_API
Returns true if seq runs interactive.
USAGE_API
echo -e "${col_green} dry${col_off}"
cat <<USAGE_API
Returns true if seq runs in dry-run mode (-d)
USAGE_API
echo -e "${col_green} verbose${col_off}"
cat <<USAGE_API
Returns true if seq runs in verbose mode (-v)
USAGE_API
echo -e "${col_green} contextHelp${col_off}"
cat <<USAGE_API
Returns true if current output is only for help purposes.
USAGE_API
echo -e "${col_green} contextExe${col_off}"
cat <<USAGE_API
Returns true if current output is in execution mode.
USAGE_API
echo -e "${col_green} confirm [OPTIONS] [QUESTION]${col_off}"
@@ -287,7 +297,7 @@ USAGE_API
dry-run is not applied in this function! The executed step is responsible.
USAGE_API
echo -e "${col_green} outColor [FOREGROUND COLOR] [BACKGROUND COLOR]${col_off}"
echo -e "${col_green} color [FOREGROUND COLOR] [BACKGROUND COLOR]${col_off}"
cat <<USAGE_API
Set output color permanently until reset.
No argument or unknown foreground color restores shell default (reset).
@@ -295,16 +305,12 @@ USAGE_API
[COLOR]: black, red, green, yellow, blue, magenta, cyan, white
USAGE_API
echo -e "${col_green} echoerr [...]${col_off}"
echo -e "${col_green} info|warning|error|debug [OPTIONS] [STRING]${col_off}"
cat <<USAGE_API
echo to stderr
[...] : all parameter are forwarded to echo
USAGE_API
echo -e "${col_green} echoseq [...]${col_off}"
cat <<USAGE_API
echo to stdout if sequencer output is not suppressed
[...] : all parameter are forwarded to echo
Output [STRING] (can be multiline) to stdout according to log level.
[OPTIONS]
-a : Append [STRING] skipping leading " [ ] " prefix
-e : Output to stderr
USAGE_API
echo -e "${col_green} echoinfo [...]${col_off}"
@@ -321,7 +327,7 @@ USAGE_API
[...] : no parameter are forwared to echo
USAGE_API
echo -e "${col_green} endCheckEmpty <VARIABLENAME> [DESCRIPTION]${col_off}"
echo -e "${col_green} endIfEmpty <VARIABLENAME> [DESCRIPTION]${col_off}"
cat <<USAGE_API
exit 666 if variable is empty
<VARIABLENAME> : Name without \$
@@ -349,11 +355,6 @@ USAGE_API
[MESSAGE]
String which is displayed in the error output
USAGE_API
echo -e "${col_green} exitIfRunning${col_off}"
cat <<USAGE_API
End sequence if an instance of it is still running
USAGE_API
}