Magellan Linux

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

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

revision 1082 by niro, Thu Apr 22 12:22:39 2010 UTC revision 1083 by niro, Mon Jun 28 18:07:29 2010 UTC
# Line 1232  syncmage() Line 1232  syncmage()
1232  syncmage_tarball()  syncmage_tarball()
1233  {  {
1234   local latest_tarball   local latest_tarball
1235     local latest_md5
1236   local temp="$(mktemp -d)"   local temp="$(mktemp -d)"
1237   local mirr mymirr   local mirr mymirr
1238    
1239     # try to get the md5 marked as latest on the server
1240     latest_md5="mage-latest.md5"
1241    
1242   # try to get the tarball marked as latest on the server   # try to get the tarball marked as latest on the server
1243   latest_tarball="mage-latest.tar.bz2"   latest_tarball="mage-latest.tar.bz2"
1244    
# Line 1244  syncmage_tarball() Line 1248  syncmage_tarball()
1248   mymirr="${mirr%/*}"   mymirr="${mirr%/*}"
1249    
1250   echo -ne "${COLBLUE} --- ${COLDEFAULT}"   echo -ne "${COLBLUE} --- ${COLDEFAULT}"
1251     echo "fetching latest md5 from ${mymirr} ..."
1252     wget \
1253     --passive-ftp \
1254     --tries 3 \
1255     --continue \
1256     --progress bar \
1257     --directory-prefix=${temp} \
1258     ${mymirr}/rsync/tarballs/${latest_md5}
1259    
1260     echo -ne "${COLBLUE} --- ${COLDEFAULT}"
1261   echo "fetching latest tarball from ${mymirr} ..."   echo "fetching latest tarball from ${mymirr} ..."
1262    
1263   wget \   wget \
# Line 1263  syncmage_tarball() Line 1277  syncmage_tarball()
1277    
1278   if [[ -f ${temp}/${latest_tarball} ]]   if [[ -f ${temp}/${latest_tarball} ]]
1279   then   then
1280     # check md5
1281     if [[ ! -f ${temp}/${latest_md5} ]]
1282     then
1283     die "md5 is missing ... aborting"
1284     else
1285     ( cd ${temp}; md5sum --check ${lastest_md5} ) || die "md5 for ${lastest_tarball} failed"
1286     fi
1287    
1288   if [[ -d ${MAGEDIR} ]]   if [[ -d ${MAGEDIR} ]]
1289   then   then
1290   echo -ne "${COLBLUE} --- ${COLDEFAULT}"   echo -ne "${COLBLUE} --- ${COLDEFAULT}"

Legend:
Removed from v.1082  
changed lines
  Added in v.1083