~xubuntu-dev/ubuntu-cdimage/xubuntu-base

« back to all changes in this revision

Viewing changes to bin/cron.daily

  • Committer: Colin Watson
  • Date: 2004-07-14 12:23:45 UTC
  • Revision ID: Arch-1:colin.watson@canonical.com--2004%cdimage--mainline--0--base-0
import from little
Import cdimage wrapper and utility scripts from little.warthogs.hbd.com.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
set -e
 
3
 
 
4
CDIMAGE_ROOT=/srv/cdimage.no-name-yet.com
 
5
DIST=warty
 
6
 
 
7
ARCHES='i386 powerpc'
 
8
PATH="$CDIMAGE_ROOT/bin:${PATH:+:$PATH}"
 
9
DATE="$(date +%Y%m%d)"
 
10
PUBLISH="$CDIMAGE_ROOT/www/daily/$DATE"
 
11
 
 
12
CDOUT="$CDIMAGE_ROOT/scratch/debian-cd"
 
13
 
 
14
if [ -z "$DEBUG" ]; then
 
15
        exec >"$CDIMAGE_ROOT/log/daily-$DATE.log" 2>&1
 
16
fi
 
17
 
 
18
echo "===== Syncing Ubuntu mirror ====="
 
19
date
 
20
anonftpsync
 
21
 
 
22
# temporary, until powerpc buildds for warty are ready
 
23
echo "===== Syncing temporary Debian powerpc mirror ====="
 
24
date
 
25
debmirror-powerpc
 
26
 
 
27
echo "===== Updating archive of local packages ====="
 
28
date
 
29
update-local-indices
 
30
 
 
31
echo "===== Updating debian-installer task list ====="
 
32
date
 
33
(cd "$CDIMAGE_ROOT/debian-cd"
 
34
 . CONF.sh
 
35
 cd tasks
 
36
 ../tools/generate_di_list)
 
37
 
 
38
echo "===== Building Ubuntu daily CDs ====="
 
39
date
 
40
cd "$CDIMAGE_ROOT/debian-cd"
 
41
for arch in ARCHES; do
 
42
        ./build.sh "$arch"
 
43
done
 
44
 
 
45
if [ -z "$DEBUG" ]; then
 
46
        echo "===== Publishing ====="
 
47
        date
 
48
        mkdir -p "$PUBLISH"
 
49
        cd "$PUBLISH"
 
50
        for arch in $ARCHES; do
 
51
                if [ -e "$CDOUT/$arch/$DIST-$arch-1.raw" ]; then
 
52
                        mv "$CDOUT/$arch/$DIST-$arch-1.raw" \
 
53
                           "$DIST-$arch-1.iso"
 
54
                        mv "$CDOUT/$arch/$DIST-$arch-1.list" \
 
55
                           "$DIST-$arch-1.list"
 
56
                else
 
57
                        echo "No CD for $arch!" >&2
 
58
                fi
 
59
        done
 
60
        md5sum "$DIST"-* > MD5SUMS
 
61
        cd ..
 
62
        ln -nsf "$DATE" current
 
63
 
 
64
        echo "===== Archiving debian-cd code ====="
 
65
        date
 
66
        cd "$CDIMAGE_ROOT"
 
67
        tar cjvf www/code/debian-cd.tar.bz2 debian-cd
 
68
 
 
69
        echo "===== Triggering mirrors ====="
 
70
        date
 
71
        sync-auckland
 
72
fi
 
73
 
 
74
echo "===== Finished ====="
 
75
date