Magellan Linux

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

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

revision 2621 by niro, Tue Mar 4 14:59:05 2014 UTC revision 2622 by niro, Tue Mar 4 15:44:27 2014 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  die() { echo "Error: $@"; exit 1; }  # set default variables
4    : ${MAGERC="@@SYSCONFDIR@@/mage.rc"}
5    : ${MLIBDIR="@@MAGELIBDIR@@"}
6    
7  # include all needed files  # include all needed files
8  [ -f /etc/mage.rc.global ] && source /etc/mage.rc.global || die "/etc/mage.rc.global missing"  source ${MLIBDIR}/common.functions.sh || exit 1
9  [ -f ${MAGERC} ] && source ${MAGERC} || die "Your ${MAGERC} is missing. Aborting."  source @@SYSCONFDIR@@/mage.rc.global || die "@@SYSCONFDIR@@/mage.rc.global missing."
10  # overrides die() function  source ${MAGERC} || die "${MAGERC} missing."
11  [ -f ${MLIBDIR}/common.functions.sh ] && source ${MLIBDIR}/common.functions.sh || die "common mage functions missing"  source ${MLIBDIR}/mage4.functions.sh || die "${MLIBDIR}/mage4.functions.sh missing."
12  [ -f ${MLIBDIR}/mage4.functions.sh ] && source ${MLIBDIR}/mage4.functions.sh || die "mage functions missing"  source ${MLIBDIR}/smage2.functions.sh || die "${MLIBDIR}/smage2.functions.sh missing."
13  [ -f ${MLIBDIR}/smage2.functions.sh ] && source ${MLIBDIR}/smage2.functions.sh || die "smage functions missing"  source @@SYSCONFDIR@@/up2date.conf || die "@@SYSCONFDIR@@/up2date.conf missing."
 [ -f /etc/up2date.conf ] && source /etc/up2date.conf || die "/etc/up2date.conf missing"  
14    
15  # respect repos from env or load repos from config file  # respect repos from env or load repos from config file
16  if [[ -z ${REPOS} ]] && [[ -n ${SMAGE_REPOS} ]]  if [[ -z ${REPOS} ]] && [[ -n ${SMAGE_REPOS} ]]

Legend:
Removed from v.2621  
changed lines
  Added in v.2622