wok-next rev 4700
tazbb: fix date checks
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jan 02 14:50:04 2010 +0100 (2010-01-02) |
parents | b4f95537c976 |
children | 0c0c693fe4c6 |
files | tazbb/stuff/tazbb |
line diff
1.1 --- a/tazbb/stuff/tazbb Sat Jan 02 11:34:40 2010 +0100 1.2 +++ b/tazbb/stuff/tazbb Sat Jan 02 14:50:04 2010 +0100 1.3 @@ -274,10 +274,10 @@ 1.4 fi 1.5 else 1.6 # Check if package is up-to-date. 1.7 - PKG_DATE=`date -u -r $PACKAGES_REPOSITORY/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg '+%m%d%H%M%Y'` 1.8 + PKG_DATE=`date -u -r $PACKAGES_REPOSITORY/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg '+%Y%m%d%H%M'` 1.9 for file in `find $pkg -type f` 1.10 do 1.11 - FILE_DATE=`date -u -r $file '+%m%d%H%M%Y'` 1.12 + FILE_DATE=`date -u -r $file '+%Y%m%d%H%M'` 1.13 [ "$2" = "--verbose" ] && echo " -> Checking: $file" 1.14 if [ "$FILE_DATE" -gt "$PKG_DATE" ] && ! grep -q $PACKAGE $DB_DIR/cooklist; then 1.15 [ "$1" = "report" ] && echo "Refresh : $PACKAGE ($VERSION)" 1.16 @@ -514,11 +514,11 @@ 1.17 CATEGORY="" 1.18 if du $pkg | grep -qw '^4' && ! echo `basename $pkg` | grep -q '^get-'; then 1.19 mkdir -p $tmp && cd $tmp 1.20 - cpio -i receipt 2>/dev/null < $pkg 1.21 + cpio -i receipt >/dev/null 2>&1 < $pkg 1.22 . ./receipt 1.23 if [ "$CATEGORY" != "meta" ]; then 1.24 [ "$2" = "--verbose" ] && echo "Testing: $PACKAGE" 1.25 - cpio -i fs.cpio.gz 2>/dev/null < $pkg 1.26 + cpio -i fs.cpio.gz >/dev/null 2>&1 < $pkg 1.27 if [ ! -f fs.cpio.gz ]; then 1.28 echo "Missing filesystem `basename $pkg`" 1.29 if [ -f $LOG_DIR/$PACKAGE.log ];then 1.30 @@ -529,7 +529,7 @@ 1.31 >> $DB_DIR/corrupted 1.32 fi 1.33 else 1.34 - zcat fs.cpio.gz | cpio -id 2>/dev/null 1.35 + zcat fs.cpio.gz | cpio -id >/dev/null 2>&1 1.36 files=`find fs -type f -o -type l` 1.37 if [ -z "$files" ]; then 1.38 echo "Empty filesystem `basename $pkg`"