Magellan Linux

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

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

revision 43 by niro, Mon Jan 10 01:59:03 2005 UTC revision 177 by niro, Sun Jul 31 15:04:16 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  # version: 0.3.6-r11  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.functions.sh,v 1.13 2005-07-31 15:04:09 niro Exp $
4    
5  mage_setup() {  mage_setup() {
6   install -d $INSTALLDB   install -d $INSTALLDB
# Line 49  update_mtime() { Line 49  update_mtime() {
49   do   do
50   echo "${pathto}§${posix}§${user}§${group}§${M_MTIME}§${md5sum}" \   echo "${pathto}§${posix}§${user}§${group}§${M_MTIME}§${md5sum}" \
51   >> ${DB_ENTRY}/.files   >> ${DB_ENTRY}/.files
52   touch -m -r ${DB_ENTRY}/.mtime ${pathto}   touch -c -m -r ${DB_ENTRY}/.mtime ${pathto}
53   done < ${DB_ENTRY}/.files-old   done < ${DB_ENTRY}/.files-old
54    
55   #remove old list   #remove old list
# Line 80  update_mtime() { Line 80  update_mtime() {
80   do   do
81   echo "${pathto}§${posix}§${link}§${M_MTIME}" \   echo "${pathto}§${posix}§${link}§${M_MTIME}" \
82   >> ${DB_ENTRY}/.symlinks   >> ${DB_ENTRY}/.symlinks
83   touch -m -r ${DB_ENTRY}/.mtime ${pathto}   touch -c -m -r ${DB_ENTRY}/.mtime ${pathto}
84   done < ${DB_ENTRY}/.symlinks-old   done < ${DB_ENTRY}/.symlinks-old
85    
86   #remove old list   #remove old list
# 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}.minc"
1366     source ${MAGEDIR}/include/${i}.minc
1367     done
1368     echo
1369     fi
1370    }
1371    
1372    sminclude() {
1373     local i
1374    
1375     if [ -n "$@" ]
1376     then
1377     for i in $@
1378     do
1379     echo "--- Including ${SMAGESCRIPTSDIR}/include/${i}.sminc"
1380     source ${SMAGESCRIPTSDIR}/include/${i}.sminc
1381     done
1382     echo
1383     fi
1384    }
1385    
1386    # checks if an newer mage version is available
1387    is_newer_mage_version_available() {
1388     local newest_mage
1389     local installed_mage
1390    
1391     newest_mage="$( CATEGORIE=app-mage MAGENAME=mage get_highest_magefile;echo $(basename ${MAGEFILE} .mage) )"
1392     installed_mage="$(magequery -n mage | cut -d' ' -f5)"
1393    
1394     if [[ ${newest_mage} > ${installed_mage} ]]
1395     then
1396     echo
1397     echo -en ${COLRED}"An update for your packetmanager is available. "${COLDEFAULT}
1398     echo -e ${COLBLUE}"[ ${newest_mage} ]"${COLDEFAULT}
1399     echo "It is recommened to install this newer version"
1400     echo "or your current system installation may brake."
1401     echo
1402     echo -en "Please update mage by running "
1403     echo -e ${COLGREEN}"'mage install mage'"${COLDEFAULT}
1404     echo
1405     fi
1406    }
1407    

Legend:
Removed from v.43  
changed lines
  Added in v.177