Subject: sh "if foo -qe bar"???
To: None <>
From: Michael South <>
List: tech-pkg
Date: 06/17/2003 17:53:38
OK, I give up. How the blazes does this work?

    if ! ${PKG_INFO} -qe "${PKGNAME}" ; then blah blah blah

(a) Why doesn't it have brackets ([, ]) around the conditional?

(b) What is "-qe" supposed to do?

(c) Why does it work within make and not interactively?

     $ if abc -qe abc; then echo hey; fi
     abc: not found
     $ if [ abc -qe abc ]; then echo hey; fi
     [: -qe: unexpected operator
      ${_PKG_SILENT}${_PKG_DEBUG}if ${PKG_INFO} -qe ${PKGBASE}; then\
      if ! ${PKG_INFO} -qe "${PKGNAME}" ; then        \
      if ${PKG_INFO} -qe ${_JAVA_PKGBASE.${_jvm_}}; then      \
      _HAVE_OSS!=      if ${PKG_INFO} -qe oss; then ${ECHO} YES; else
           ${ECHO} NO; fi

Michael South