21
by Ubuntu Archive
#! /bin/sh -e -> set -e, for easier debugging |
1 |
#! /bin/sh
|
2 |
set -e
|
|
3 |
||
54
by Ubuntu Archive
Rework livefs log mirroring to not block on dud buildds |
4 |
amd64="kapok" |
5 |
i386="cardamom" |
|
6 |
powerpc="royal" |
|
122
by Colin Watson
livefs-build-logs-mirror: kishi00 does all the arm builds nowadays |
7 |
arm="kishi00" |
132
by Ubuntu Archive
Add arm64 and ppc64el to livefs-logs |
8 |
arm64="magic" |
9 |
ppc64el="fisher01" |
|
54
by Ubuntu Archive
Rework livefs log mirroring to not block on dud buildds |
10 |
|
3
by Ubuntu Archive
add log mirroring scripts |
11 |
mkdir -p /home/ubuntu-archive/public_html/livefs-build-logs |
12 |
cd /home/ubuntu-archive/public_html/livefs-build-logs
|
|
13 |
find . -type d -name latest -print0 | xargs -r -0 rm -rf
|
|
14 |
find . -type d -name current -print0 | xargs -r -0 rm -rf
|
|
54
by Ubuntu Archive
Rework livefs log mirroring to not block on dud buildds |
15 |
|
120
by Colin Watson
livefs-build-logs-mirror: be quiet when stdout is not a terminal |
16 |
if [ -t 1 ]; then |
17 |
VERBOSE=: |
|
18 |
else
|
|
19 |
VERBOSE=false |
|
20 |
fi
|
|
21 |
||
22 |
mirror () { |
|
23 |
local machine ret
|
|
24 |
machine="$1" |
|
25 |
ret=: |
|
26 |
if $VERBOSE; then |
|
27 |
echo "$(date): starting mirror for $machine" |
|
28 |
fi
|
|
29 |
wget -q --mirror -np -nH --cut-dirs=2 -A out http://$machine.buildd/~buildd/LiveCD/ \ |
|
30 |
|| ret=false |
|
31 |
if $VERBOSE; then |
|
32 |
echo -n "$(date): finished mirror for $machine " |
|
33 |
if $ret; then |
|
34 |
echo "(success)" |
|
35 |
else
|
|
36 |
echo "(failed)" |
|
37 |
fi
|
|
38 |
fi
|
|
39 |
$ret
|
|
40 |
}
|
|
41 |
||
132
by Ubuntu Archive
Add arm64 and ppc64el to livefs-logs |
42 |
for machine in $amd64 $i386 $powerpc $arm $arm64 $ppc64el; do |
120
by Colin Watson
livefs-build-logs-mirror: be quiet when stdout is not a terminal |
43 |
mirror "$machine" & |
44 |
RES="$RES $!" |
|
54
by Ubuntu Archive
Rework livefs log mirroring to not block on dud buildds |
45 |
done
|
46 |
||
47 |
for proc in $RES; do |
|
48 |
wait $proc && retval=0 |
|
49 |
done
|
|
50 |
||
51 |
if [ "$retval" != 0 ]; then |
|
52 |
echo "LiveFS log mirroring had a sad" |
|
53 |
fi
|