xen: Fix the figlet banner

4.20 is just wide enough to cause figlet to split the banner onto two lines:

   __  __
   \ \/ /___ _ __
    \  // _ \ '_ \
    /  \  __/ | | |
   /_/\_\___|_| |_|

   _  _    ____   ___                     _        _     _
  | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
  |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
     |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

Instruct figlet to use 100 column width, rather than 80, resulting in:

   __  __            _  _    ____   ___                     _        _     _
   \ \/ /___ _ __   | || |  |___ \ / _ \    _   _ _ __  ___| |_ __ _| |__ | | ___
    \  // _ \ '_ \  | || |_   __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
    /  \  __/ | | | |__   _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | |  __/
   /_/\_\___|_| |_|    |_|(_)_____|\___/    \__,_|_| |_|___/\__\__,_|_.__/|_|\___|

While fixing this, also fix a rendering error in the non-figlet case; while a
leading space looks better for figlet, it looks very wrong for the simple
one-line case.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2024-07-22 16:25:07 +01:00
1 parent e44f33ccdd
commit 5bf3818c5e
1 file changed
+2 -2
+2 -2
View File
@@ -1,9 +1,9 @@
quiet_cmd_banner = BANNER $@
define cmd_banner
if command -v figlet >/dev/null 2>&1 ; then \
echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \
echo " Xen $(XEN_FULLVERSION)" | figlet -w 100 -f $< > $@.tmp; \
else \
echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \
echo "Xen $(XEN_FULLVERSION)" > $@.tmp; \
fi; \
mv -f $@.tmp $@
endef
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.