Magellan Linux

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

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

revision 2605 by niro, Tue Mar 4 14:45:26 2014 UTC revision 2618 by niro, Tue Mar 4 15:33:19 2014 UTC
# Line 2  Line 2 
2  # Magellan Linux Installer (mage.sh)  # Magellan Linux Installer (mage.sh)
3  # $Id$  # $Id$
4    
5  # default die function  # set default variables
6  die()  : ${MAGERC="@@SYSCONFDIR@@/mage.rc"}
7  {  : ${MLIBDIR="@@MAGELIBDIR@@"}
8   xtitleclean  
9   mqueryfeature "debug" && echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT}  # first of all include common functions
10   echo -e ${COLRED}"$@"${COLDEFAULT}  source ${MLIBDIR}/common.functions.sh
11   exit 1  source @@SYSCONFDIR@@/mage.rc.global
12  }  source ${MAGERC}
13    source ${MLIBDIR}/mage4.functions.sh
 # include all needed files  
 [ -f /etc/mage.rc.global ] &&  \  
  source /etc/mage.rc.global || \  
  die "/etc/mage.rc.global missing"  
   
 [ -f ${MAGERC} ] && source ${MAGERC} || \  
  die "Your ${MAGERC} is missing. Aborting."  
   
 [ -f ${MLIBDIR}/mage4.functions.sh ] && \  
  source ${MLIBDIR}/mage4.functions.sh || \  
  die "mage functions missing"  
14    
15  # export default path  # export default path
16  export PATH="${PATH}:${MLIBDIR}"  export PATH="${PATH}:${MLIBDIR}"
# Line 44  then Line 33  then
33  fi  fi
34    
35  # default messages  # default messages
 showversion()  
 {  
  local MAGEVERSION="$(< ${MLIBDIR}/version)"  
   
  echo -en "Magellan Package Manager v${MAGEVERSION} "  
  echo -e  "-- Niels Rogalla (niro@magellan-linux.de)"  
 }  
   
36  print_usage()  print_usage()
37  {  {
38   #showversion   #showversion

Legend:
Removed from v.2605  
changed lines
  Added in v.2618