From 1f0374d8a612e8ae4cfe1424e586b443ab10aebb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Apr 2013 18:32:10 +0200 Subject: mkarchroot: Create working directory if needed --- mkarchroot.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkarchroot.in b/mkarchroot.in index fee2a37..67a79aa 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -156,6 +156,10 @@ else die "Working directory '${working_dir}' already exists - try using -f" fi + if [[ ! -d "${working_dir}" ]]; then + mkdir -p "${working_dir}" + fi + if { type -P btrfs && btrfs subvolume create "${working_dir}"; } &>/dev/null; then chmod 0755 "${working_dir}" fi -- cgit v1.2.3-70-g09d2