Subject: sh "if foo -qe bar"???
To: None <tech-pkg@netbsd.org>
From: Michael South <msouth@msouth.org>
List: tech-pkg
Date: 06/17/2003 17:53:38
OK, I give up. How the blazes does this work?
bsd.pkg.mk:
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
$
bsd.pkg.mk:
${_PKG_SILENT}${_PKG_DEBUG}if ${PKG_INFO} -qe ${PKGBASE}; then\
if ! ${PKG_INFO} -qe "${PKGNAME}" ; then \
java-vm.mk:
if ${PKG_INFO} -qe ${_JAVA_PKGBASE.${_jvm_}}; then \
ossaudio.buildlink2.mk:
_HAVE_OSS!= if ${PKG_INFO} -qe oss; then ${ECHO} YES; else
${ECHO} NO; fi
--
Michael South
msouth@msouth.org