--- trunk/mage/usr/lib/mage/magequery.sh 2008/10/05 10:33:04 777 +++ trunk/mage/usr/lib/mage/magequery.sh 2011/05/12 21:28:23 1288 @@ -12,7 +12,7 @@ echo " -b BUILD searches for build number BUILD, needs -n -v" echo " -c CAT shows all packages of given categorie" echo " -i shows an inventory of all installed packages" - echo " -f PATH searches packages name in given path" + echo " -f PATH searches package names in given path" echo echo " Examples:" echo @@ -26,7 +26,8 @@ SEARCH_ONLY_PATH=false SEARCH_ONLY_CAT=false -while getopts "n:v:b:f:c:hi-" opt ; do +while getopts "n:v:b:f:c:hi-" opt +do case "${opt}" in n) S_PNAME="${OPTARG}" @@ -76,6 +77,11 @@ unset i pkg for i in $(fgrep -rl "${SEARCH_PATH}" ${INSTALLDB}) do + # ignore magefiles! + case ${i} in + *.mage) continue ;; + esac + # print categorie and pkgname pkg="$(basename ${i%/*/*})/$(basename ${i%/*})" if [[ -z $(echo ${S_PACKAGES} | grep ${pkg}) ]]