--- branches/mage-next/src/depwalker.in 2014/03/05 08:15:28 2625 +++ branches/mage-next/src/depwalker.in 2014/03/05 08:19:29 2628 @@ -2,12 +2,16 @@ # $Id$ # dependeny walker -# default die function -die() -{ - echo ${COLRED}"$@"${COLDEFAULT} - exit 1 -} +# set default variables +: ${MAGERC="@@SYSCONFDIR@@/mage.rc"} +: ${MLIBDIR="@@MAGELIBDIR@@"} + +# first of all include common functions +source ${MLIBDIR}/common.functions.sh || exit 1 +source @@SYSCONFDIR@@/mage.rc.global || die "@@SYSCONFDIR@@/mage.rc.global missing" +source ${MAGERC} || die "Your ${MAGERC} is missing. Aborting." +source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing" +source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing" decho() { @@ -17,12 +21,6 @@ fi } -# include all needed files -source @@SYSCONFDIR@@/mage.rc.global || die "@@SYSCONFDIR@@/mage.rc.global missing" -source ${MAGERC} || die "Your ${MAGERC} is missing. Aborting." -source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing" -source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing" - usage() { echo