From 30938e7713087b4a2639ae6d1db81b6fc32496ad Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Sat, 27 Aug 2022 14:37:48 +0500 Subject: [PATCH] Automatically create a directory for HOME_DIR when it is set --- conty-start.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conty-start.sh b/conty-start.sh index 5098c75..397089c 100755 --- a/conty-start.sh +++ b/conty-start.sh @@ -43,7 +43,7 @@ mount_point="${working_dir}"/mnt # a problem with mounting the image due to an incorrectly calculated offset. # The size of this script -scriptsize=23929 +scriptsize=23981 # The size of the utils archive utilssize=2542302 @@ -607,6 +607,8 @@ run_bwrap () { show_msg "Set home directory to ${HOME_DIR}" custom_home+=("--bind" "${HOME_DIR}" "${HOME}") + + [ ! -d "${HOME_DIR}" ] && mkdir -p "${HOME_DIR}" fi # Set the XAUTHORITY variable if it's missing (which is unlikely)