BUILD_SCRIPT=$(mktemp)
cat > $BUILD_SCRIPT <<-EOF
-cd /srv/build/liveboot
+cd /srv/build
apt-get -y install debootstrap ldap-utils
git clone git://git/ri/liveboot.git
cd liveboot
./build.sh $BUILD_NUMBER
EOF
-sudo pbuilder --execute --bindmounts /srv/build/liveboot -- $BUILD_SCRIPT
+sudo pbuilder --execute --bindmounts /srv/build/ -- $BUILD_SCRIPT
-ls /srv/build/liveboot/builds
+cd /srv/build/liveboot/builds
+mv *-* /srv/mirror/liveboot
+cd /srv/build/liveboot
+mv cache ..
+cd ..
+rm liveboot -Rf
+mkdir liveboot
+mv cache liveboot