summaryrefslogtreecommitdiff
path: root/autoinstall/bootstrap/reinit-cowbuilder.txt
blob: f8d01db5bcbd848115ae09b6e5ef239053de7734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

mkdir -p /home/kolab/bin
cat > /home/kolab/bin/reinit-cowbuilder << EOF
#!/bin/bash

for ARCH in i386 amd64; do
    for DIST in precise quantal wheezy sid; do
        . \${HOME}/.pbuilderrc
        sudo rm -rf /var/cache/pbuilder/base-\${DIST}-\${ARCH}.cow
        sudo cowbuilder --create \
            --architecture \${ARCH} --distribution \${DIST} \
            --basepath /var/cache/pbuilder/base-\${DIST}-\${ARCH}.cow \
            --mirror \${MIRRORSITE}
    done
done
EOF
chmod 755 /home/kolab/bin/reinit-cowbuilder

# Initialize them as well
for ARCH in i386 amd64; do
    for DIST in precise quantal wheezy sid; do
        . /home/kolab/.pbuilderrc
        rm -rf /var/cache/pbuilder/base-${DIST}-${ARCH}.cow
        cowbuilder --create \
            --architecture ${ARCH} --distribution ${DIST} \
            --basepath /var/cache/pbuilder/base-${DIST}-${ARCH}.cow \
            --mirror ${MIRRORSITE}
    done
done
EOF