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.4 2005-09-27 14:38:01 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.5 2005-10-02 12:20:13 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
2520 |
unset ipbuild |
unset ipbuild |
2521 |
done |
done |
2522 |
} |
} |
2523 |
|
|
2524 |
|
export_inherits() |
2525 |
|
{ |
2526 |
|
local include="$1" |
2527 |
|
shift |
2528 |
|
|
2529 |
|
while [ "$1" ] |
2530 |
|
do |
2531 |
|
local functions="$1" |
2532 |
|
|
2533 |
|
# sanity checks |
2534 |
|
[ -z "${include}" ] && die "export_inherits(): \$include not given." |
2535 |
|
[ -z "${functions}" ] && die "export_inherits(): \$functions not given." |
2536 |
|
|
2537 |
|
eval "${functions}() { ${include}_${functions} ; }" |
2538 |
|
|
2539 |
|
# debug |
2540 |
|
[[ ${MAGEDEBUG} = on ]] && typeset -f "${functions}" |
2541 |
|
|
2542 |
|
shift |
2543 |
|
done |
2544 |
|
} |