summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-04-06 18:32:10 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-04-06 18:32:10 +0200
commit1f0374d8a612e8ae4cfe1424e586b443ab10aebb (patch)
tree9d5072c39d5c0357db83a3fd4da7b4e97dbc80a6
parentf03086a0e11fdf39a03b8887f9b36b118efecf81 (diff)
mkarchroot: Create working directory if needed
-rw-r--r--mkarchroot.in4
1 files changed, 4 insertions, 0 deletions
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