Commit b0af8956 authored by Holger Levsen's avatar Holger Levsen
Browse files

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

parent fe7da4e6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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

		if [ -d "$SCHROOT_BASE/$TARGET" ] ; then
			mv "$SCHROOT_BASE/$TARGET" "$SCHROOT_BASE/$TARGET.old"
		mv $SCHROOT_BASE/root.x86_64 $SCHROOT_BASE/$TARGET
			sudo rm -rf --one-file-system "$SCHROOT_BASE/$TARGET.old"
		fi
		mv $SCHROOT_BASE/root.x86_64 $SCHROOT_BASE/$TARGET

		rm archlinux-bootstrap-$BOOTSTRAP_DATE-x86_64.tar.gz
	fi