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 2360 by niro, Mon Jan 6 12:36:37 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  {  {
# Line 312  then Line 300  then
300   ALLDEPS="${ALLDEPS} ${MAGEFILE}"   ALLDEPS="${ALLDEPS} ${MAGEFILE}"
301   fi   fi
302   else   else
303   # debug info   # debug info
304   decho "ignored package"   decho "ignored package"
305   decho   decho
  fi  
306   fi   fi
307   done   done
308  else  else

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