[PATCH] find-debuginfo.sh: Add --help, --version and man page.

Dmitry V. Levin ldv@altlinux.org
Fri Apr 30 12:19:08 GMT 2021


Hi Mark,

On Fri, Apr 30, 2021 at 02:10:14PM +0200, Mark Wielaard wrote:
> Hi Dmitry,
> 
> On Fri, 2021-04-30 at 02:06 +0300, Dmitry V. Levin wrote:
> > I suggest to use "cat" instead of multiple echoes, e.g.
> > 
> >   cat <<-'EOF'
> > 	Usage: find-debuginfo.sh [OPTION]... [builddir]
> > 	automagically generates debug info and file lists
> > 
> > 	Options:
> > 	[...]
> > 	--unique-debug-src-base "%{name}-%{VERSION}-
> > %{RELEASE}.%{_arch}")
> > 
> > 	All file names in switches are relative to builddir ('.' if not
> > given).
> >   EOF
> 
> Yes, that is obviously much nicer.

It would look even nicer if EOF was quoted, e.g. 'EOF'.
>From bash manual page:
"If any part of word is quoted, the delimiter is the result of quote
removal on word, and the lines in the here-document are not expanded."

[...]
> +--unique-debug-src-base \"%{name}-%{VERSION}-%{RELEASE}.%{_arch}\")

I suggest to quote EOF once and forget about quoting anything in the whole
text.


-- 
ldv


More information about the Debugedit mailing list