Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage4.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 370 by niro, Thu Apr 27 11:52:59 2006 UTC revision 413 by niro, Fri Jan 19 23:15:04 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # Magellan Linux Installer (mage.sh)  # Magellan Linux Installer (mage.sh)
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.13 2006-04-27 11:52:59 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.sh,v 1.15 2007-01-19 23:15:04 niro Exp $
4    
5  # default die function  # default die function
6  die()  die()
7  {  {
8     echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT}
9   echo -e ${COLRED}"$@"${COLDEFAULT}   echo -e ${COLRED}"$@"${COLDEFAULT}
10   exit 1   exit 1
11  }  }
# Line 153  case ${METHOD} in Line 154  case ${METHOD} in
154   # source the highest magefile of this pkg   # source the highest magefile of this pkg
155   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
156    
157   # package does not exists   # package is masked
158   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
159    
160   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
161   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on
# Line 183  case ${METHOD} in Line 184  case ${METHOD} in
184   # source the highest magefile of this pkg   # source the highest magefile of this pkg
185   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
186    
187   # package does not exists   # package is masked
188   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
189    
190   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
191   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on
# Line 212  case ${METHOD} in Line 213  case ${METHOD} in
213   # source the highest magefile of this pkg   # source the highest magefile of this pkg
214   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
215    
216   # package does not exists   # package is masked
217   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
218    
219   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
220   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on
# Line 248  case ${METHOD} in Line 249  case ${METHOD} in
249   # source the highest magefile of this pkg   # source the highest magefile of this pkg
250   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
251    
252   # package does not exists   # package is masked
253   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
254    
255   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
256   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on
# Line 290  case ${METHOD} in Line 291  case ${METHOD} in
291   # source the highest magefile of this pkg   # source the highest magefile of this pkg
292   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
293    
294   # package does not exists   # package is masked
295   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
296    
297   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
298   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on
# Line 380  case ${METHOD} in Line 381  case ${METHOD} in
381   # source the highest magefile of this pkg   # source the highest magefile of this pkg
382   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))   PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME}))
383    
384   # package does not exists   # package is masked
385   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist."   [ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' is masked and not available for installation."
386    
387   # convert PKGNAME to PNAME/PVER/PBUILD   # convert PKGNAME to PNAME/PVER/PBUILD
388   # we're working *only* with these three vars from here on   # we're working *only* with these three vars from here on

Legend:
Removed from v.370  
changed lines
  Added in v.413