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.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 $ |
4 |
|
|
5 |
# default die function |
# default die function |
6 |
die() |
die() |
153 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
154 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
155 |
|
|
156 |
|
# package does not exists |
157 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
158 |
|
|
159 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
160 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
161 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |
183 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
184 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
185 |
|
|
186 |
|
# package does not exists |
187 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
188 |
|
|
189 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
190 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
191 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |
212 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
213 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
214 |
|
|
215 |
|
# package does not exists |
216 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
217 |
|
|
218 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
219 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
220 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |
248 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
249 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
250 |
|
|
251 |
|
# package does not exists |
252 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
253 |
|
|
254 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
255 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
256 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |
290 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
291 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
292 |
|
|
293 |
|
# package does not exists |
294 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
295 |
|
|
296 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
297 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
298 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |
380 |
# source the highest magefile of this pkg |
# source the highest magefile of this pkg |
381 |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
PKGNAME=$(get_value_from_magefile PKGNAME $(get_highest_magefile ${PCAT} ${MAGENAME})) |
382 |
|
|
383 |
|
# package does not exists |
384 |
|
[ -z "${PKGNAME}" ] && die "Package '${MAGENAME}' does not exist." |
385 |
|
|
386 |
# convert PKGNAME to PNAME/PVER/PBUILD |
# convert PKGNAME to PNAME/PVER/PBUILD |
387 |
# we're working *only* with these three vars from here on |
# we're working *only* with these three vars from here on |
388 |
PNAME="$(pkgname2pname ${PKGNAME})" |
PNAME="$(pkgname2pname ${PKGNAME})" |