Update and extend template creation

- Example usage of "exe" and "exep"
- step_1 is not mandatory any more
This commit is contained in:
2019-10-30 13:22:56 +01:00
parent d206ee1a1d
commit 9a408fa1d4

10
sequencer/sequencer.sh Executable file → Normal file
View File

@@ -294,11 +294,15 @@ createTemplate() {
fi fi
echo "#!/bin/bash" > $TEMPLATE_NAME echo "#!/bin/bash" > $TEMPLATE_NAME
echo >> $TEMPLATE_NAME echo >> $TEMPLATE_NAME
echo "# Step 1 is mandatory" >> $TEMPLATE_NAME echo "step_1_info() { echo \"My custom step\"; }" >> $TEMPLATE_NAME
echo "step_1_info() { echo \"My custom step \$1\"; }" >> $TEMPLATE_NAME
echo "step_1_alias() { ALIAS=\"begin\"; }" >> $TEMPLATE_NAME echo "step_1_alias() { ALIAS=\"begin\"; }" >> $TEMPLATE_NAME
echo "step_1() {" >> $TEMPLATE_NAME echo "step_1() {" >> $TEMPLATE_NAME
echo " echo \"Doing something...\"" >> $TEMPLATE_NAME echo " echo \"Doing something for step \$1 ...\"" >> $TEMPLATE_NAME
echo " echo \"Command line arguments starting with argument 2: \$@\"" >> $TEMPLATE_NAME
echo " # Use exe for regular command" >> $TEMPLATE_NAME
echo " # Use exep \"command\" for commands containing pipes or redirects" >> $TEMPLATE_NAME
echo " exe ls" >> $TEMPLATE_NAME
echo " exep \"dmesg | grep usb\"" >> $TEMPLATE_NAME
echo "}" >> $TEMPLATE_NAME echo "}" >> $TEMPLATE_NAME
echo >> $TEMPLATE_NAME echo >> $TEMPLATE_NAME
echo "VERSION_SEQREV=${VERSION_REV}" >> $TEMPLATE_NAME echo "VERSION_SEQREV=${VERSION_REV}" >> $TEMPLATE_NAME