Commit b0af8956 authored by Holger Levsen's avatar Holger Levsen

reproducible Arch Linux: only move old schroot away if it exists

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent fe7da4e6
......@@ -45,9 +45,11 @@ bootstrap() {
sudo rm -rf --one-file-system "$SCHROOT_BASE/root.x86_64/"
sudo tar xzf archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz -C $SCHROOT_BASE
mv "$SCHROOT_BASE/$TARGET" "$SCHROOT_BASE/$TARGET.old"
if [ -d "$SCHROOT_BASE/$TARGET" ] ; then
mv "$SCHROOT_BASE/$TARGET" "$SCHROOT_BASE/$TARGET.old"
sudo rm -rf --one-file-system "$SCHROOT_BASE/$TARGET.old"
fi
mv $SCHROOT_BASE/root.x86_64 $SCHROOT_BASE/$TARGET
sudo rm -rf --one-file-system "$SCHROOT_BASE/$TARGET.old"
rm archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment