#!/bin/bash # this is the main script template set -eo pipefail if [[ -n "${BASHD_DEBUG}" ]]; then # a inevitability that this will be used set -x fi trap cleanup EXIT # A little more robust cleanup # trap errors and set the ERR trap trap 'echo -e "\nERROR: $BASH_COMMAND\nFILE: ${BASH_SOURCE[0]}\nLINE: ${BASH_LINENO[0]}\n" >&2; exit 1' ERR cleanup() { # We can clean up any temp files or what nots, but for now a place holder true } source ./config_json.bash # can be json or ini, I preffer json # Code goes here eval "echo "Hello World"" eval "moo" eval "echo "cow"" #runcmd 'false' #runcmd 'echo "moo"'