52 lines
1.4 KiB
Bash
Executable File
52 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
readonly toolName=mytool
|
|
|
|
# Already defined by sequencer.sh, but may be overwritten
|
|
#readonly seq_configName="${sq_scriptName}.cfg"
|
|
#readonly seq_configTemplate="${seq_origin}/${sq_configName}.example"
|
|
|
|
sq_aptOpt=
|
|
sq_config=0
|
|
|
|
seq_config() {
|
|
## Called once before executing steps.
|
|
## e.g. to source a config file manually:
|
|
#. "${seq_origin}/${seq_configName}"
|
|
|
|
## or to use sequencer api with profile config file support:
|
|
#if initSeqConfig -p "${seq_fileName}" "${seq_configTemplate}" ; then
|
|
|
|
## or to use sequencer api with global config file:
|
|
#if initSeqConfig "${seq_configName}" "${seq_configTemplate}" ; then
|
|
# sq_config=1
|
|
#else
|
|
# # End if no configuration file exists
|
|
# dry || return -1
|
|
#fi
|
|
|
|
## Apt cmdline option to suppress user interaction
|
|
interactive || sq_aptOpt="-y"
|
|
|
|
## Disable error checks if external scripts are used
|
|
## e.g. error on unbound variables
|
|
#disableErrorCheck
|
|
|
|
## Return of non zero value will abort the sequence
|
|
return 0
|
|
}
|
|
|
|
step_1_info() { echoinfoArgs "[OPTIONS]"; echo "My custom step"; }
|
|
step_1_alias() { echo "begin"; }
|
|
step_1() {
|
|
info "Doing something for step ${1:-} ..."
|
|
warning "Command line arguments starting with argument 2: $*"
|
|
# Use exe for regular command
|
|
# Use exep "command" for commands containing pipes or redirects
|
|
exe ls
|
|
exep "dmesg | head"
|
|
}
|
|
|
|
readonly sqr_minVersion=16
|
|
. /usr/local/bin/sequencer.sh
|