#!/bin/sh # # $Id: pkgcheck.sh,v 1.1 2007/06/14 09:58:56 chfl4gs Exp $ # # Original script is from FreeSBIE2 pkginstall.sh. Credit to # the author and FreeSBIE team # escape_pkg() { echo $1 | sed 's/\+/\\\+/' } PKGFILE=freesbie/conf/packages; echo "This will check pkg not available in your system." while read row; do if [ -z "${row}" ]; then continue; fi set +e if (echo ${row} | grep -q "^#"); then continue; fi set -e pkg=$(echo $row | cut -d\ -f 1) # pkg_info might fail if the listed package isn't present set +e origins=$(pkg_info -EX "^$(escape_pkg ${pkg})($|-[^-]+$)") retval=$? set -e if [ ${retval} -ne 0 ]; then echo "${pkg}" fi done < ${PKGFILE}