a2ps-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: html:ps delegation


From: Akim Demaille
Subject: Re: html:ps delegation
Date: 18 Sep 2002 11:07:25 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

Please, keep the CC to the list.

| On Wednesday 18 September 2002 09:38, Akim Demaille wrote:
| > Yes, please install on both.  Additionally, report this in NEWS too.
| 
| Add in NEWS for the check of remote command in netscape -> ok.
| But the mozilla information is for the FAQ ??
| 
| > +COM_netscape_test="test -L ${HOME}/.netscape/lock"
| > +AC_SUBST(COM_netscape_test)
| >
| > Errr, I don't understand this part at all.  If you decided to check at
| > runtime which one we should run, then just have all the tests run a
| > runtime, there is no reason to decide for COM_netscape_test at
| > configure time.
| 
| Because, the a2ps.cf accept only one line script to execute a delegation (We 
| can't use comment '#'). And we don't find another solution:
| if html2ps is installed : the delagation check if a nestcape run at this time:
| 
|   if test -L /home/kcnarf/.netscape/lock; then \

This is wrong.  You don't mean foo="$HOME/...", you mean foo='$HOME/...'.


|     rm -f #f0; \
|     if echo '$f' | grep '^/' >/dev/null 2>&1; then \
|       ${NETSCAPE:-netscape} -noraise -remote 'openfile($f)'; \
|     else \
|       ${NETSCAPE:-netscape} -noraise -remote 'openfile(%d/$f)'; \
|     fi && \
|     ${NETSCAPE:-netscape} -noraise -remote 'saveas(#f0,postscript)' && \
|     #{del.psselect} #f0 | #{del.psnup}; \
|   else \
|     html2ps -D -o #f0 '$f' && #{del.psselect} #f0 | #{del.psnup}; \
|   fi
| 
| or if html2ps isn't installed the delegation don't test this (it use alway 
| netscape):
|   if true; then \
|     rm -f #f0; \
|     if echo '$f' | grep '^/' >/dev/null 2>&1; then \
|       [...]
|   fi
| 
| It is the configure script who add the test:
| "test -L /home/kcnarf/.netscape/lock" or "true"
| 
| Are you ok with us about this test before I commit ?

I'm OK, we can fix that later.  

I'm saying that I don't understand why you don't do that instead:

if test -L /home/kcnarf/.netscape/lock; then \
  rm -f #f0; \
  if echo '$f' | grep '^/' >/dev/null 2>&1; then \
    ${NETSCAPE:-netscape} -noraise -remote 'openfile($f)'; \
  else \
    ${NETSCAPE:-netscape} -noraise -remote 'openfile(%d/$f)'; \
  fi && \
  ${NETSCAPE:-netscape} -noraise -remote 'saveas(#f0,postscript)' && \
  #{del.psselect} #f0 | #{del.psnup}; \
elif (html2ps --version) >/dev/null 2.&1 \
  html2ps -D -o #f0 '$f' && #{del.psselect} #f0 | #{del.psnup}; \
else
  echo "cannot delegate html: Netscape and html2ps are not available" >&2
  exit 1
fi


I.e., *all* the tests are runtime.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]