Re: In rcs 5.9.1 build-aux/extract-help is bash-specific

Thien-Thi Nguyen <[email protected]> Sun, 20 Oct 2013 17:04:55 +0200
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
() Dagobert Michelsen <[email protected]>
() Sun, 20 Oct 2013 15:20:54 +0200

   Indeed, taking out "set -e" also makes the script not bail out,
   but now I get

   ya_ci  -- super.o ld: fatal: symbol referencing errors.

OK, so that was a bad idea.  How about this:


-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil
a.diff (text/x-diff, 543 B)
 build-aux/extract-help |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/build-aux/extract-help b/build-aux/extract-help
index 466980f..74ca1a3 100755
--- a/build-aux/extract-help
+++ b/build-aux/extract-help
@@ -87,9 +87,8 @@ echo 'static char const' $vprefix'help[] = ""'
 echo ';'
 
 # Pull in command support only if needed.
-if [ 0 = `grep -c 'CHECK_HV (".*")' "$in"` ] ; then
-    echo '#include "b-yacmd.h"'
-fi
+grep 'CHECK_HV (".*")' "$in" 1>/dev/null 2>&1 \
+    || echo '#include "b-yacmd.h"'
 
 exit 0
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlJj8RsACgkQZwMiJEyAdQLiLACgr/sHZayn3VysQJHWB5B/E0mL
DlQAoLxsAhFn3bR+14Bnl0PbIrpO8400
=DXO1
-----END PGP SIGNATURE-----