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