Magellan Linux

Diff of /branches/mage-next/src/depwalker.in

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

trunk/mage/usr/lib/mage/depwalker.sh revision 2376 by niro, Mon Jan 6 14:35:29 2014 UTC branches/mage-next/src/depwalker.in revision 2627 by niro, Wed Mar 5 08:18:22 2014 UTC
# Line 2  Line 2 
2  # $Id$  # $Id$
3  # dependeny walker  # dependeny walker
4    
 # default die function  
 die()  
 {  
  echo ${COLRED}"$@"${COLDEFAULT}  
  exit 1  
 }  
   
5  decho()  decho()
6  {  {
7   if [[ ${DEBUG} = 1 ]]   if [[ ${DEBUG} = 1 ]]
# Line 17  decho() Line 10  decho()
10   fi   fi
11  }  }
12    
13  # include all needed files  # set default variables
14  [ -f /etc/mage.rc.global ] &&  \  : ${MAGERC="@@SYSCONFDIR@@/mage.rc"}
15   source /etc/mage.rc.global || \  : ${MLIBDIR="@@MAGELIBDIR@@"}
16   die "/etc/mage.rc.global missing"  
17    # first of all include common functions
18  [ -f ${MAGERC} ] && source ${MAGERC} || \  source ${MLIBDIR}/common.functions.sh || exit 1
19   die "Your ${MAGERC} is missing. Aborting."  source @@SYSCONFDIR@@/mage.rc.global || die "@@SYSCONFDIR@@/mage.rc.global missing"
20    source ${MAGERC} || die "Your ${MAGERC} is missing. Aborting."
21  [ -f ${MLIBDIR}/mage4.functions.sh ] && \  source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing"
22   source ${MLIBDIR}/mage4.functions.sh || \  source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing"
  die "mage functions missing"  
   
 [ -f ${MLIBDIR}/smage2.functions.sh ] && \  
  source ${MLIBDIR}/smage2.functions.sh || \  
  die "smage functions missing"  
23    
24  usage()  usage()
25  {  {

Legend:
Removed from v.2376  
changed lines
  Added in v.2627