Magellan Linux

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

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

revision 57 by niro, Tue Feb 15 00:37:07 2005 UTC revision 178 by niro, Sun Jul 31 15:28:53 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-r12  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.functions.sh,v 1.14 2005-07-31 15:28:53 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     [[ ${MAGEDEBUG} = on ]] && \
1366     echo "--- Including ${MAGEDIR}/include/${i}.minc"
1367     source ${MAGEDIR}/include/${i}.minc
1368     done
1369     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.57  
changed lines
  Added in v.178