sequencer - correct indentation using .editorconfig

This commit is contained in:
2022-03-14 21:31:53 +01:00
parent 71612aef94
commit 992868b14d

View File

@@ -144,15 +144,15 @@ sequencer.sh global variables:
sequencer.sh build-in functions:
USAGE_API
echo -e "${GREEN} exe [COMMANDLINE]${NC}"
cat <<USAGE_API
echo -e "${GREEN} exe [COMMANDLINE]${NC}"
cat <<USAGE_API
Execute command line without pipes or redirects (>,<,|).
Supporting: dry-run (-d): only print command without execution
verbose (-v): print command before execution
USAGE_API
echo -e "${GREEN} exep \"[COMMAND STRING(s)]\"${NC}"
cat <<USAGE_API
echo -e "${GREEN} exep \"[COMMAND STRING(s)]\"${NC}"
cat <<USAGE_API
See exe, but support for pipes or redirects.
e.g.: exep echo hello world \\> \\'out put.log\\'
exep echo hello world \\> out\\\\ put.log
@@ -163,14 +163,14 @@ cat <<USAGE_API
- All apostrophes need to be esacped since the command line is given as string.
USAGE_API
echo -e "${GREEN} escpath <PATH>${NC}"
cat <<USAGE_API
echo -e "${GREEN} escpath <PATH>${NC}"
cat <<USAGE_API
Escaping non-printable characters with the proposed POSIX $'' syntax
e.g. \$(escpath /my own/ho me/path) = $(escpath /my own/ho me/path)
USAGE_API
echo -e "${GREEN} initSeqConfig [OPTION] <NAME> [TEMPLATE]${NC}"
cat <<USAGE_API
echo -e "${GREEN} initSeqConfig [OPTION] <NAME> [TEMPLATE]${NC}"
cat <<USAGE_API
Create a configuration file in $SEQ_CONFIG_HOME/ and source it if already existent.
[OPTION]
-p : Use profiles
@@ -184,8 +184,8 @@ cat <<USAGE_API
3 : No configuration created
USAGE_API
echo -e "${GREEN} addConf <OPTIONS> [SOURCE TYPE] <SOURCE> <DESTINATION FILE>${NC}"
cat <<USAGE_API
echo -e "${GREEN} addConf <OPTIONS> [SOURCE TYPE] <SOURCE> <DESTINATION FILE>${NC}"
cat <<USAGE_API
Trying to write or append text or a file (<SOURCE>) to a destination file.
If the CONFIGFILE exists, a backup (name_%Y%m%d-%H%M%S.bck) is saved at the same location.
If -s fails or -m, "$(realpath "$MISSING_CONF")" is created with the conflicts
@@ -203,65 +203,65 @@ cat <<USAGE_API
Target file to be created or modified.
USAGE_API
echo -e "${GREEN} step <STEP NUMBER OR ALIAS>${NC}"
cat <<USAGE_API
echo -e "${GREEN} step <STEP NUMBER OR ALIAS>${NC}"
cat <<USAGE_API
Executes a single step also by alias. Useful if step numbers get reorganized.
dry-run is not applied in this function! The executed step is responsible.
USAGE_API
echo -e "${GREEN} outColor [FOREGROUND COLOR] [BACKGROUND COLOR]${NC}"
cat <<USAGE_API
echo -e "${GREEN} outColor [FOREGROUND COLOR] [BACKGROUND COLOR]${NC}"
cat <<USAGE_API
Set output color permanently until reset.
No argument or unknown foreground color restores shell default (reset).
Color reset happens after every step and step_info function call.
[COLOR]: black, red, green, yellow, blue, magenta, cyan, white
USAGE_API
echo -e "${GREEN} echoerr [...]${NC}"
cat <<USAGE_API
echo -e "${GREEN} echoerr [...]${NC}"
cat <<USAGE_API
echo to stderr
[...] : all parameter are forwarded to echo
USAGE_API
echo -e "${GREEN} echoseq [...]${NC}"
cat <<USAGE_API
echo -e "${GREEN} echoseq [...]${NC}"
cat <<USAGE_API
echo to stdout if sequencer output is not suppressed
[...] : all parameter are forwarded to echo
USAGE_API
echo -e "${GREEN} echoinfo [...]${NC}"
cat <<USAGE_API
echo -e "${GREEN} echoinfo [...]${NC}"
cat <<USAGE_API
echo additional correctly indented line to step info
[...] : all parameter are forwared to echo
USAGE_API
echo -e "${GREEN} echoinfoArgs [...]${NC}"
cat <<USAGE_API
echo -e "${GREEN} echoinfoArgs [...]${NC}"
cat <<USAGE_API
echo argument description after step number or alias.
This must be called first in the step info function.
Does not add a newline at the end.
[...] : no parameter are forwared to echo
USAGE_API
echo -e "${GREEN} endCheckEmpty <VARIABLENAME> [DESCRIPTION]${NC}"
cat <<USAGE_API
echo -e "${GREEN} endCheckEmpty <VARIABLENAME> [DESCRIPTION]${NC}"
cat <<USAGE_API
exit 666 if variable is empty
<VARIABLENAME> : Name used within eval
[DESCRIPTION] : Additional text for error output
USAGE_API
echo -e "${GREEN} saveReturn [ERRORCODE]${NC}"
cat <<USAGE_API
echo -e "${GREEN} saveReturn [ERRORCODE]${NC}"
cat <<USAGE_API
Save ERRORCODE if it is != 0 for later use with endReturn
USAGE_API
echo -e "${GREEN} getReturn${NC}"
cat <<USAGE_API
echo -e "${GREEN} getReturn${NC}"
cat <<USAGE_API
Return last saved error code
USAGE_API
echo -e "${GREEN} endReturn [OPTIONS] [MESSAGE]${NC}"
cat <<USAGE_API
echo -e "${GREEN} endReturn [OPTIONS] [MESSAGE]${NC}"
cat <<USAGE_API
Notifys user that there was an error (previously saved by saveReturn,
or -o [ERRORCODE]) and asks to continue or end the sequence.
Always exits with evaluated error code.
@@ -272,8 +272,8 @@ cat <<USAGE_API
String which is displayed in the error output
USAGE_API
echo -e "${GREEN} exitIfRunning${NC}"
cat <<USAGE_API
echo -e "${GREEN} exitIfRunning${NC}"
cat <<USAGE_API
End sequence if an instance of it is still running
USAGE_API
@@ -281,10 +281,10 @@ USAGE_API
# check if there is another PID other than this one
exitIfRunning() {
if pidof -o %PPID -x "${0##*/}">>/dev/null; then
if pidof -o %PPID -x "${0##*/}">>/dev/null; then
echoseq " [E] Sequence already running"
exit 1
fi
fi
}
# Echo only if not -qq ($QUIET -ne 2)