mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Line break figlets with hyphen-names.
@ 2022-02-17  9:25 Christian Melki
  2022-02-18 13:02 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Melki @ 2022-02-17  9:25 UTC (permalink / raw)
  To: ptxdist

Some names are a bit longer and use a hyphen.
A slight beautification before generating output,
by breaking a long word with a newline.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 scripts/lib/ptxd_make_xpkg_pkg.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 70e1bfb8c..c565f5870 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -743,6 +743,7 @@ install replace figlet:
 	esac | \
 	awk '{ if ($0 !~ "^ *$") printf("%s\\n", $0) }'  # newlines for sed
     } &&
+    value=$(sed 's,-,-\n,g' <<< ${value}) &&
     figlet="$(ptxd_figlet_helper "$value" "$escapemode")" &&
     sed -i -e "s#${placeholder}#${figlet}#g" "${dirs[@]/%/${dst}}" ||
 
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Line break figlets with hyphen-names.
  2022-02-17  9:25 [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Line break figlets with hyphen-names Christian Melki
@ 2022-02-18 13:02 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2022-02-18 13:02 UTC (permalink / raw)
  To: Christian Melki; +Cc: ptxdist

On Thu, Feb 17, 2022 at 10:25:10AM +0100, Christian Melki wrote:
> Some names are a bit longer and use a hyphen.
> A slight beautification before generating output,
> by breaking a long word with a newline.

But there are also names with a hyphen that are quite short and this gets
ugly. I think we've had a patch like this in the past.

So nack.

I think the fix should happen in figlet. It already breaks at spaces when
or hard after 80 chars (of the output). It should not be hard to extend
this to break after a '-' as well.

Michael

> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  scripts/lib/ptxd_make_xpkg_pkg.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 70e1bfb8c..c565f5870 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -743,6 +743,7 @@ install replace figlet:
>  	esac | \
>  	awk '{ if ($0 !~ "^ *$") printf("%s\\n", $0) }'  # newlines for sed
>      } &&
> +    value=$(sed 's,-,-\n,g' <<< ${value}) &&
>      figlet="$(ptxd_figlet_helper "$value" "$escapemode")" &&
>      sed -i -e "s#${placeholder}#${figlet}#g" "${dirs[@]/%/${dst}}" ||
>  
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-18 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17  9:25 [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Line break figlets with hyphen-names Christian Melki
2022-02-18 13:02 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox