File tree Expand file tree Collapse file tree
automated_builder/roles/gui-build/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ set -o errexit
55set -o nounset
66set -o pipefail
77set -o errtrace
8+ shopt -s inherit_errexit
9+ shopt -s shift_verbose
810
911readonly BUILD_LOG=' /home/ansible/build.log'
1012
@@ -15,10 +17,11 @@ readonly BUILD_LOG='/home/ansible/build.log'
1517on_exit () {
1618 local rc=$?
1719 if [ " ${rc} " -ne 0 ] && [ -r " ${BUILD_LOG} " ]; then
18- printf ' \n=== build_vms_from_tag.sh: failed (rc=%d). Tail of %s: ===\n' \
19- " ${rc} " " ${BUILD_LOG} " >&2
20+ printf ' %s\n' \
21+ " " \
22+ " === build_vms_from_tag.sh: failed (rc=${rc} ). Tail of '${BUILD_LOG} ': ===" >&2
2023 tail --lines=200 -- " ${BUILD_LOG} " >&2 || true
21- printf ' === end of build.log tail ===\n ' >&2
24+ printf ' %s\n ' ' === end of build.log tail ===' >&2
2225 fi
2326 exit " ${rc} "
2427}
@@ -35,7 +38,7 @@ main() {
3538 # # Using 'pipefail' so a non-zero exit from build_command propagates
3639 # # through the pipe.
3740 set -o pipefail
38- build_command " $@ " 2>&1 | tee -a -- " ${BUILD_LOG} "
41+ build_command " $@ " 2>&1 | tee --append -- " ${BUILD_LOG} "
3942}
4043
4144build_command () {
You can’t perform that action at this time.
0 commit comments