Namespace src/Framework
src/Framework
Overview
Directory src/Framework
file source src/Framework/createTempFile.sh
Framework::createTempFile
create a temp file using default TMPDIR variable
Arguments
- $1 (templateName:String): template name to use(optional)
Environment variables
- TMPDIR (String): (default value /tmp)
src/Framework/run.sh
file source src/Framework/run.sh
Framework::run
run command and store data in global variables
- bash_framework_status
- bash_framework_duration
- bash_framework_output redirecting error output to stdout is not supported, you can instead redirect stderr to a file if needed
Arguments
- … (command:String[]): command with arguments to execute
Variables set
- bash_framework_status (the): exit status of the command
- bash_framework_duration (the): duration of the command
- bash_framework_output (the): output of the command
See also
src/Framework/trapAdd.sh
file source src/Framework/trapAdd.sh
Framework::trapAdd
appends a command to a trap when you define a trap, an eventual existing trap is replaced by the new one. This method allows to add trap on several signals without removing previous handler.
Example
trap "echo '- SIGUSR1 original'" SIGUSR1
Framework::trapAdd "echo '- SIGUSR1&2 overridden'" SIGUSR1 SIGUSR2
kill -SIGUSR1 $$
## output
## - SIGUSR1 original
## - SIGUSR1&2 overridden
kill -SIGUSR2 $$
## output
## - SIGUSR1&2 overridden
Arguments
- $1 (trapAddCmd:String): command to execute if trap
- … (signals:String[]): signals to trap
Exit codes
- 1: if traps not provided