Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage3.functions.sh

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

revision 81 by niro, Wed Jun 1 15:52:33 2005 UTC revision 171 by niro, Sun Jul 31 14:15:59 2005 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # Magellan Linux Installer Functions (mage.functions.sh)  # Magellan Linux Installer Functions (mage.functions.sh)
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.functions.sh,v 1.10 2005-06-01 15:52:33 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.functions.sh,v 1.11 2005-07-31 14:15:59 niro Exp $
4    
5  mage_setup() {  mage_setup() {
6   install -d $INSTALLDB   install -d $INSTALLDB
# Line 745  syncmage() { Line 745  syncmage() {
745    
746   #clean up backup files (foo~)   #clean up backup files (foo~)
747   find ${MAGEDIR} -name *~ -exec rm '{}' ';'   find ${MAGEDIR} -name *~ -exec rm '{}' ';'
748    
749     # check if an newer mage version is available
750     is_newer_mage_version_available
751  }  }
752    
753  cleanpkg(){  cleanpkg(){
# Line 1351  EOF Line 1354  EOF
1354   echo "${PKG_NAME}"   echo "${PKG_NAME}"
1355   fi   fi
1356  }  }
1357    
1358    minclude() {
1359     local i
1360    
1361     if [ -n "$@" ]
1362     then
1363     for i in $@
1364     do
1365     echo "--- including ${MAGEDIR}/include/${i}.incl"
1366     source ${MAGEDIR}/include/${i}.minc
1367     done
1368     fi
1369    }
1370    
1371    sminclude() {
1372     local i
1373    
1374     if [ -n "$@" ]
1375     then
1376     for i in $@
1377     do
1378     echo "--- including ${SMAGESCRIPTSDIR}/include/${i}.incl"
1379     source ${SMAGESCRIPTSDIR}/include/${i}.sminc
1380     done
1381     fi
1382    }
1383    
1384    # checks if an newer mage version is available
1385    is_newer_mage_version_available() {
1386     local newest_mage
1387     local installed_mage
1388    
1389     newest_mage="$( CATEGORIE=app-mage MAGENAME=mage get_highest_magefile;echo $(basename ${MAGEFILE} .mage) )"
1390     installed_mage="$(magequery -n mage | cut -d' ' -f5)"
1391    
1392     if [[ ${newest_mage} > ${installed_mage} ]]
1393     then
1394     echo
1395     echo -en ${COLRED}"An update for your packetmanager is available. "${COLDEFAULT}
1396     echo -e ${COLBLUE}"[ ${newest_mage} ]"${COLDEFAULT}
1397     echo "It is recommened to install this newer version"
1398     echo "or your current system installation may brake."
1399     echo
1400     echo -en "Please update mage by running "
1401     echo -e ${COLGREEN}"'mage install mage'"${COLDEFAULT}
1402     echo
1403     fi
1404    }
1405    

Legend:
Removed from v.81  
changed lines
  Added in v.171