From eab19ffead35df805483ff35fb4fb550f565b23a Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Tue, 16 Nov 2021 10:25:55 +0000 Subject: [PATCH] ci: pass shutdown fold description to fold command For displaying a coloured title for the shutdown section in the logs, instead of having the colour control codes directly written in run.sh, we can pass the section title as an argument to "travis_fold()" and have it format and print it for us. This is cleaner, and slightly more in-line with what we do in the CI files of the vmtest repository. --- travis-ci/vmtest/run.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/travis-ci/vmtest/run.sh b/travis-ci/vmtest/run.sh index 098b88a..571ce36 100755 --- a/travis-ci/vmtest/run.sh +++ b/travis-ci/vmtest/run.sh @@ -475,12 +475,11 @@ guestfish --remote \ upload "$tmp" /etc/rcS.d/S50-run-tests : \ chmod 755 /etc/rcS.d/S50-run-tests -fold_shutdown="$(travis_fold start shutdown)" +fold_shutdown="$(travis_fold start shutdown Shutdown)" cat <"$tmp" #!/bin/sh -echo ${fold_shutdown} -echo -e '\033[1;33mShutdown\033[0m\n' +echo -e '${fold_shutdown}' poweroff HERE