From 6cc26307b7742e4c17de2bcf36525bb7b1208637 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 13 Mar 2023 09:08:35 +0100 Subject: [PATCH] common: Mark output from Infix shell scripts similarly to Make Similarly to how $(call IXMSG,"hello world") outputs a blue information line from a makefile, provide `ixmsg` to accomplish the same thing in shell scripts. Use a different prefix (`#!:` vs `>>>`) to differentiate it from makefile output. --- board/common/lib.sh | 5 +++++ board/common/post-image.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/board/common/lib.sh b/board/common/lib.sh index fc836cb5..1c8d7dee 100644 --- a/board/common/lib.sh +++ b/board/common/lib.sh @@ -1,3 +1,8 @@ +ixmsg() +{ + printf "\e[37;44m#!: $@\e[0m\n" +} + die() { echo "$@" >&2 diff --git a/board/common/post-image.sh b/board/common/post-image.sh index e037f7ef..bcf91125 100755 --- a/board/common/post-image.sh +++ b/board/common/post-image.sh @@ -7,19 +7,24 @@ load_cfg BR2_EXTERNAL_INFIX_PATH load_cfg BR2_ARCH load_cfg SIGN_KEY + +ixmsg "Signing SquashFS Image" $common/sign.sh $BR2_ARCH $SIGN_KEY load_cfg DISK_IMAGE if [ "$DISK_IMAGE" = "y" ]; then + ixmsg "Creating Disk Image" $common/mkdisk.sh -a $BR2_ARCH fi load_cfg GNS3_APPLIANCE if [ "$GNS3_APPLIANCE" = "y" ]; then + ixmsg "Creating GNS3 Appliance" $common/mkgns3a.sh fi load_cfg FIT_IMAGE if [ "$FIT_IMAGE" = "y" ]; then + ixmsg "Creating Traditional FIT Image" $common/mkfit.sh fi