source: soft/build_system/build_system/upload/robot/trunk/check_hdlist @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 637 bytes
Line 
1#!/bin/bash
2
3TMPDIR=$1
4PATH=$2
5
6OK=1
7for i in $PATH/media/*/release/; do
8    if [ $i != "$PATH/media/media_info" ]; then
9        COUNT_DIR=`/usr/bin/find $i -maxdepth 1 -name '*.rpm'| /usr/bin/wc -l`
10        COUNT_HD=`/usr/bin/packdrake -l $i/media_info/hdlist.cz | /usr/bin/wc -l`
11        COUNT_HD=$[COUNT_HD+10]
12        echo $i: $COUNT_DIR / $COUNT_HD
13        if [ $COUNT_DIR -gt $COUNT_HD ]; then
14            echo ERROR check_hdlist: hdlist for $i is corrupted
15            OK=0
16        fi
17    fi
18done
19
20if [ $OK == 0 ]; then
21    echo ERROR check_hdlist: hdlist corrupted, rebuilding
22    TMPDIR=$TMPDIR ~/robot/gendistrib --nochkdep --nobadrpm --blind --noclean $PATH
23fi
Note: See TracBrowser for help on using the repository browser.