Commit 6caad191 authored by Pierre Schmitz's avatar Pierre Schmitz
Browse files

Only try to use btrfs snapshots if chroots are on a btrfs partition

parent 092fe2ff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -58,7 +58,9 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
			stat_done
		fi

		if [[ "$(stat -f -c %T "${copy}")" == btrfs ]]; then
			{ type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null
		fi
		rm -rf --one-file-system "${copy}"
	done
	exec 9>&-
+4 −2
Original line number Diff line number Diff line
@@ -160,9 +160,11 @@ else
		mkdir -p "${working_dir}"
	fi

	if [[ "$(stat -f -c %T "${working_dir}")" == btrfs ]]; then
		if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then
			chmod 0755 "${working_dir}"
		fi
	fi

	chroot_lock