--- trunk/mage/usr/lib/mage/mage4.sh 2005/12/26 23:13:42 305 +++ trunk/mage/usr/lib/mage/mage4.sh 2006/04/27 11:52:59 370 @@ -1,6 +1,6 @@ #!/bin/sh # Magellan Linux Installer (mage.sh) -# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.12 2005-12-26 23:13:42 niro Exp $ +# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.13 2006-04-27 11:52:59 niro Exp $ # default die function die() @@ -153,6 +153,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})" @@ -180,6 +183,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})" @@ -206,6 +212,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})" @@ -239,6 +248,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})" @@ -278,6 +290,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})" @@ -365,6 +380,9 @@ # source the highest magefile of this pkg PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) + # package does not exists + [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." + # convert PKGNAME to PNAME/PVER/PBUILD # we're working *only* with these three vars from here on PNAME="$(pkgname2pname ${PKGNAME})"