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

Mark Wielaard mark@klomp.org
Fri Apr 30 12:37:53 GMT 2021


Hi Dmitry,

On Fri, 2021-04-30 at 15:19 +0300, Dmitry V. Levin wrote:
> 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.

You are right again, the current escaping looks ugly in the --help
text. I fixed it like you suggested:

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 5ea57ca..4f7ebef 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -19,7 +19,7 @@
 
 help()
 {
-  cat <<EOF
+  cat <<'EOF'
 Usage: find-debuginfo.sh [OPTION]... [builddir]
 automagically generates debug info and file lists
 
@@ -80,17 +80,17 @@ If --build-id-seed SEED is given then debugedit is
called to
 update the build-ids it finds adding the SEED as seed to recalculate
 the build-id hash.  This makes sure the build-ids in the ELF files
 are unique between versions and releases of the same package.
-(Use --build-id-seed \"%{VERSION}-%{RELEASE}\".)
+(Use --build-id-seed "%{VERSION}-%{RELEASE}".)
 
 If --unique-debug-suffix SUFFIX is given then the debug files created
 for <FILE> will be named <FILE>-<SUFFIX>.debug.  This makes sure
.debug
 are unique between package version, release and architecture.
-(Use --unique-debug-suffix \"-%{VERSION}-%{RELEASE}.%{_arch}\".)
+(Use --unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}".)
 
 If --unique-debug-src-base BASE is given then the source directory
 will be called /usr/debug/src/<BASE>.  This makes sure the debug
source
 dirs are unique between package version, release and achitecture (Use
---unique-debug-src-base \"%{name}-%{VERSION}-%{RELEASE}.%{_arch}\")
+--unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}")
 
 All file names in switches are relative to builddir ('.' if not
given).
 EOF


More information about the Debugedit mailing list