From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 18 Feb 2022 14:02:48 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nL2uO-002tu6-RN for lore@lore.pengutronix.de; Fri, 18 Feb 2022 14:02:48 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nL2uN-00088l-W5; Fri, 18 Feb 2022 14:02:47 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nL2tf-00088a-5s; Fri, 18 Feb 2022 14:02:03 +0100 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nL2te-00HOzm-Sx; Fri, 18 Feb 2022 14:02:02 +0100 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nL2td-00F5xj-Av; Fri, 18 Feb 2022 14:02:01 +0100 Date: Fri, 18 Feb 2022 14:02:01 +0100 From: Michael Olbrich To: Christian Melki Message-ID: Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20220217092510.3867323-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220217092510.3867323-1-christian.melki@t2data.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Line break figlets with hyphen-names. X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 > --- > 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