Separating sequence controller from step definition

This commit is contained in:
2019-04-02 22:36:56 +02:00
parent ad724ddc3d
commit cf1bfc527f
4 changed files with 123 additions and 47 deletions

49
stepTemplate.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
##
## Sequencer interface:
## - step_[1 - 255] functions performing custom operations
## - help() function describing functionality
##
function step_1 {
echo -e "Eins"
cat .nofile
saveReturn $?
}
function step_2 {
echo -e "Zwei"
endReturn
echo zwo
}
function step_3 {
echo -e "Drei"
echo drei
}
function step_10 {
echo -e "Zehn"
echo zehn
}
function step_11 {
echo -e"Elf"
echo elf
}
help() {
echo " Step Documentation"
echo " 1: Step with failure and saveReturn"
echo " 2: Step with endReturn at the beginning"
echo " 3: Regular step without return check (last step when starting with 1 or 2)"
echo
echo " 10: Regular step without return check (staring point for separate sequence)"
echo " 11: Regular step without return check (last step of sequence starting with 10)"
}
#
## Path to local sequencer.sh script
. ./sequencer.sh