summaryrefslogtreecommitdiff
path: root/autoinstall/bootstrap/reinit-cowbuilder.txt
diff options
context:
space:
mode:
Diffstat (limited to 'autoinstall/bootstrap/reinit-cowbuilder.txt')
-rw-r--r--autoinstall/bootstrap/reinit-cowbuilder.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/autoinstall/bootstrap/reinit-cowbuilder.txt b/autoinstall/bootstrap/reinit-cowbuilder.txt
new file mode 100644
index 0000000..f8d01db
--- /dev/null
+++ b/autoinstall/bootstrap/reinit-cowbuilder.txt
@@ -0,0 +1,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