bash3boilerplate/test/scenario/templater/run.sh
Manuel Streuhofer 785e7e9f8b Cleanup all *.sh following shellcheck advice (#80)
* Cleanup all *.sh following shellcheck advice

Closes #79

* do not shellcheck scripts out of our control
2016-12-16 08:18:03 +01:00

34 lines
812 B
Bash

#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)"
echo "--"
env TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./app.template.cfg ./app.cfg
cat app.cfg
rm -f app.cfg
echo "--"
export TARGET_HOST="127.0.0.1"
# shellcheck source=src/templater.sh
source "${__root}/src/templater.sh"
templater ./app.template.cfg ./app.cfg
cat app.cfg
rm -f app.cfg
echo "--"
env ALLOW_REMAINDERS="1" TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./break.template.cfg ./break.cfg
cat break.cfg
rm -f break.cfg
echo "--"
env TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./break.template.cfg ./break.cfg
cat break.cfg
rm -f break.cfg