Step help as own function within step definition script

fixes #1
This commit is contained in:
2019-04-05 12:06:47 +01:00
parent bfccac6b28
commit 17eaeee234
4 changed files with 107 additions and 120 deletions

View File

@@ -2,47 +2,43 @@
##
## Sequencer interface:
## - step_[1 - 255] functions performing custom operations
## - help() function describing functionality
## - step_[1 - 255]_info [STEP NUMBER]
## functions providing short header for help and user interaction
## - step_[1 - 255] [STEP NUMBER]
## functions performing custom operations
##
function step_1 {
echo -e "Eins"
step_1_info() { echo "Step $1 header"; }
step_1() {
cat .nofile
saveReturn $?
}
function step_2 {
step_2_info() { echo "Step $1 header"; }
step_2() {
echo -e "Zwei"
endReturn
echo zwo
}
function step_3 {
step_3_info() { echo "Step $1 header"; }
step_3() {
echo -e "Drei"
echo drei
}
function step_10 {
step_10_info() { echo "Step $1 header"; }
step_10() {
echo -e "Zehn"
echo zehn
}
function step_11 {
step_11_info() { echo "Step $1 header"; }
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