aboutsummaryrefslogtreecommitdiff
path: root/pbuildd/build-agent.sh
blob: 3864e8255a4c6e1ddfcde8b3f3165189858761ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# accept host name as $1
# return unbuilt package, and reserve the package for building.

# exit 1 if no more package is available.
# 2004 1 12, Junichi Uekawa


cd /game/buildd/

#build agent for pbuilder
for A in $( zcat /mirror/debian/dists/sid/main/source/Sources.gz | sed -n 's/^Package: //p' | cut -d\  -f1|sort | uniq | bogosort -n ); do
    #waitingroutine
    if [ $(find -name $A.log | wc -l ) != "0" ]; then
        echo Already build tried for "$A" >&2
    else
        echo $A
        echo "$1 $(date)" > WORKING/$A.log
        exit 0
    fi
done
exit 1