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 179 by niro, Sun Jul 31 18:50:19 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.15 2005-07-31 18:50:19 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     [[ ${MAGEDEBUG} = on ]] && \
1366     echo "--- Including ${MAGEDIR}/include/${i}.minc"
1367     source ${MAGEDIR}/include/${i}.minc
1368     done
1369     [[ ${MAGEDEBUG} = on ]] && echo
1370     fi
1371    }
1372    
1373    sminclude() {
1374     local i
1375    
1376     if [ -n "$@" ]
1377     then
1378     for i in $@
1379     do
1380     echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc"
1381     source ${SMAGESCRIPTSDIR}/include/${i}.sminc
1382     done
1383     echo
1384     fi
1385    }
1386    
1387    # checks if an newer mage version is available
1388    is_newer_mage_version_available() {
1389     local newest_mage
1390     local installed_mage
1391    
1392     newest_mage="$( CATEGORIE=app-mage MAGENAME=mage get_highest_magefile;echo $(basename ${MAGEFILE} .mage) )"
1393     installed_mage="$(magequery -n mage | cut -d' ' -f5)"
1394    
1395     if [[ ${newest_mage} > ${installed_mage} ]]
1396     then
1397     echo
1398     echo -en ${COLRED}"An update for your packetmanager is available. "${COLDEFAULT}
1399     echo -e ${COLBLUE}"[ ${newest_mage} ]"${COLDEFAULT}
1400     echo "It is recommened to install this newer version"
1401     echo "or your current system installation may brake."
1402     echo
1403     echo -en "Please update mage by running "
1404     echo -e ${COLGREEN}"'mage install mage'"${COLDEFAULT}
1405     echo
1406     fi
1407    }
1408    

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