Re: RCS 5.9.0 does not compile on Solaris

Thien-Thi Nguyen <[email protected]> Tue, 04 Jun 2013 16:43:37 +0200
Newsgroups gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
() Jörn Clausen <[email protected]>
() Tue, 04 Jun 2013 12:05:33 +0200

   Then the include would still be missing.

   The problem seems to be the backtick evaluation. Maybe too many
   different quotes for Solaris /bin/sh. When I assign the result of the
   grep to a variable and check the variable:

   check=`grep -c 'CHECK_HV (".*")' "$in"`
   if [ $check = 0 ] ; then
       echo '#include "b-yacmd.h"'
   fi

   the condition is never reached. The script bails out silently in the
   first line.

Hmm, how about:

 check=`grep -c 'CHECK_HV (".*")' "$in" || echo 0`

That should assign "0" to ‘check’ even if grep(1) fails.

-- 
Thien-Thi Nguyen
GPG key: 4C807502
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAlGt/R4ACgkQZwMiJEyAdQLmVQCfVdcwHtGpkDtpFLeOCE2YdvQs
R58AoOWTPWLLVGqI7OW4jc7k2HD6orTQ
=yu1m
-----END PGP SIGNATURE-----