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.
This commit is contained in:
Tobias Waldekranz
2023-03-13 09:57:04 +01:00
parent d777d59ee2
commit 6cc26307b7
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -1,3 +1,8 @@
ixmsg()
{
printf "\e[37;44m#!: $@\e[0m\n"
}
die()
{
echo "$@" >&2
+5
View File
@@ -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