source: soft/build_system/build_system/upload/robot/trunk/rebuild_srpms @ 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: 967 bytes
RevLine 
[1]1#!/usr/bin/zsh -f
2## Chmouel Boudjnah <chmouel@mandriva.com>
3## Rebuild all the SRPMS in the current directory.
4
5dir="."
6PERL5LIB=/home2/chmou/.pl/:/usr/local/lib/perl5/site_perl/5.005/:/usr/local/lib/perl5/5.00503/
7
8[[ "$1" = "-a" ]] && dir=/mnt/BIG/dis/ports/queue/
9
10b="/home/mandrake/toupload/"
11s="$b/SRPMS"
12c=".currently_building_it/"
13mkdir -p $s $c failed/
14
15~mandrake/robot/doble $dir/*rpm|xargs rm -f
16
17for i in $dir/*rpm;do
18    nn="$c/$i"; mv $i $nn
19    ~mandrake/robot/getheader i386 $nn > /dev/null || {
20        sudo ~mandrake/robot/ftpdev -c $nn
21        continue
22    }
23    P=$(~mandrake/robot/ch -m $nn)
24    sudo rpm --define "packager $P" --define  "_rpmdir /home/mandrake/toupload/" --define  "_topdir /home/mandrake/rpm/"  --rebuild $nn
25    if [[ "$?" = "0" ]];then
26        sudo ~mandrake/robot/ftpdev -c $nn
27    else
28        mv $nn failed/
29    fi
30done
31
32for j in $b/*/*.rpm;do
33    sudo ~mandrake/robot/ftpdev -c $j
34done
35
36rmdir failed ||:;rmdir $c ||:
37sudo ~mandrake/robot/cooclean
Note: See TracBrowser for help on using the repository browser.