1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer Functions (mage.functions.sh) |
# Magellan Linux Installer Functions (mage.functions.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.31 2007-04-10 09:21:55 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.32 2007-06-30 15:31:46 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
2340 |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
2341 |
echo -ne "${COLBOLD}${can_pcat}/${can_pname}:${COLDEFAULT}" |
echo -ne "${COLBOLD}${can_pcat}/${can_pname}:${COLDEFAULT}" |
2342 |
echo -e "${COLRED} ${can_ver_list} ${COLDEFAULT}" |
echo -e "${COLRED} ${can_ver_list} ${COLDEFAULT}" |
2343 |
echo |
echo [04] app-emulation/virtualbox-1.4.0-r3 |
2344 |
if [ ${MAGE_UNINSTALL_TIMEOUT} -gt 0 ] |
if [ ${MAGE_UNINSTALL_TIMEOUT} -gt 0 ] |
2345 |
then |
then |
2346 |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
2406 |
for i in $* |
for i in $* |
2407 |
do |
do |
2408 |
case $1 in |
case $1 in |
2409 |
--pcat|-c) shift; pcat="$1" ;; |
--pcat|-c) shift; pcat="$1" ;; [04] app-emulation/virtualbox-1.4.0-r3 |
2410 |
--pname|-n) shift; pname="$1" ;; |
--pname|-n) shift; pname="$1" ;; |
2411 |
--pver|-v) shift; pver="$1" ;; |
--pver|-v) shift; pver="$1" ;; |
2412 |
--pbuild|-b) shift; pbuild="$1" ;; |
--pbuild|-b) shift; pbuild="$1" ;; [04] app-emulation/virtualbox-1.4.0-r3 |
2413 |
esac |
esac |
2414 |
shift |
shift |
2415 |
done |
done [04] app-emulation/virtualbox-1.4.0-r3 |
2416 |
|
|
2417 |
# sanity checks; abort if not given |
# sanity checks; abort if not given |
2418 |
[ -z "${pcat}" ] && die "mage_uninstall() \$pcat not given." |
[ -z "${pcat}" ] && die "mage_uninstall() \$pcat not given." [04] app-emulation/virtualbox-1.4.0-r3 |
2419 |
[ -z "${pname}" ] && die "mage_uninstall() \$pname not given." |
[ -z "${pname}" ] && die "mage_uninstall() \$pname not given." |
2420 |
[ -z "${pver}" ] && die "mage_uninstall() \$pver not given." |
[ -z "${pver}" ] && die "mage_uninstall() \$pver not given." |
2421 |
[ -z "${pbuild}" ] && die "mage_uninstall() \$pbuild not given." |
[ -z "${pbuild}" ] && die "mage_uninstall() \$pbuild not given." [04] app-emulation/virtualbox-1.4.0-r3 |
2422 |
|
|
2423 |
# check needed global vars |
# check needed global vars |
2424 |
[ -z "${MAGEDIR}" ] && die "mage_uninstall() \$MAGEDIR not set." |
[ -z "${MAGEDIR}" ] && die "mage_uninstall() \$MAGEDIR not set." |
2431 |
echo -ne "${COLBLUE}${pcat}/${COLDEFAULT}" |
echo -ne "${COLBLUE}${pcat}/${COLDEFAULT}" |
2432 |
echo -e "${COLRED}${pname}-${pver}-${pbuild}${COLDEFAULT}" |
echo -e "${COLRED}${pname}-${pver}-${pbuild}${COLDEFAULT}" |
2433 |
|
|
2434 |
magefile="${INSTALLDB}/${pcat}/${pname}-${pver}-${pbuild}/${pname}-${pver}-${pbuild}.mage" |
magefile="${MROOT}${INSTALLDB}/${pcat}/${pname}-${pver}-${pbuild}/${pname}-${pver}-${pbuild}.mage" |
2435 |
source ${magefile} |
source ${magefile} |
2436 |
|
|
2437 |
## preremove scripts |
## preremove scripts |