mkarchroot: Create working directory if needed

This commit is contained in:
Pierre Schmitz 2013-04-06 18:32:10 +02:00
parent f03086a0e1
commit 1f0374d8a6
1 changed files with 4 additions and 0 deletions

View File

@ -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