mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Andreas Pretzsch <apr@cn-eng.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] scripts/lib: also create CSV lists on "ptxdist make license-report"
Date: Thu, 29 Mar 2018 14:08:51 +0200	[thread overview]
Message-ID: <1522325331.20104.25.camel@ws-apr.office.loc> (raw)
In-Reply-To: <20180329094613.e4chicxs4pwkj52m@pengutronix.de>

On Do, 2018-03-29 at 11:46 +0200, Michael Olbrich wrote:
> Please create separate ptxd_make_license_report_tex /
> ptxd_make_license_report_csv functions that are called by
> ptxd_make_license_report.

Ok.

> > +ptxd_make_world_license_write_csv_header() {
> > +	local -r STRING_QUOTE='"'
> > +	local -r CSV_SEPARATOR='|'
> 
> Lower case for local variables.

Ok.

>  Also, I think a helper to write one line
> makes sense. Untested:
> 
> helper() {
> 	string_quote='"'
> 	csv_separator='|'
> 	while [ ${#} -gt 0 ]; do
> 		if [ -n "${1}" ]; then
> 			echo -n "${string_quote}${1}${string_quote}"
> 		fi
> 		shift
> 		if [ [ ${#} -gt 0 ]; do
> 			echo -n ${csv_separator}"
> 		fi
> 	done
> 	echo
> }

Good point. Will do.


> > +ptxd_make_world_license_write_csv() {
> > +	local -r STRING_QUOTE='"'
> > +	local -r CSV_SEPARATOR='|'
> > +	local -a flags=( "${!pkg_license_flags[@]}" )
> > +	local l
> > +
> > +	# not required, seems to be filtered before:
> > +	#case "${pkg_license}" in
> > +	#*ignore*)
> > +	#	# ignore this package, e.g. do not list it in the report
> > +	#	return 0
> > +	#	;;
> > +	#esac

Any comment on this commented section ?
Back then, I copied the logic from somewhere, but filtering was not
required in a real run. Still, kept it as reference.


I'll rework the patch as above over Easter time, plus
  - include section tag (see Denis' patch)
  - squash it into one with "add suffix _tex"


Best regards,
  Andreas

-- 

carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch        Tel. +49-(0)7307-936088-1
Lange Strasse 28a                       Fax: +49-(0)7307-936088-9
89250 Senden, Germany                   email: apr@cn-eng.de


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-03-29 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 20:23 [ptxdist] [PATCH 0/2] license-report: also create CSV lists Andreas Pretzsch
2018-03-28 20:23 ` [ptxdist] [PATCH 1/2] scripts/lib: make_world_license: add suffix "_tex" to ptxd_make_world_license_write Andreas Pretzsch
2018-03-28 20:23 ` [ptxdist] [PATCH 2/2] scripts/lib: also create CSV lists on "ptxdist make license-report" Andreas Pretzsch
2018-03-29  9:46   ` Michael Olbrich
2018-03-29 12:08     ` Andreas Pretzsch [this message]
2018-03-29 13:51       ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522325331.20104.25.camel@ws-apr.office.loc \
    --to=apr@cn-eng.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox