update condition (#141)

Closes #140
This commit is contained in:
AbdBarho 2022-10-15 08:08:36 +02:00 committed by GitHub
parent 3682303355
commit 463f332d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ for to_path in "${!MOUNTS[@]}"; do
set -Eeuo pipefail
from_path="${MOUNTS[${to_path}]}"
rm -rf "${to_path}"
if [ -d "$from_path" ]; then
if [ ! -f "$from_path" ]; then
mkdir -vp "$from_path"
fi
mkdir -vp "$(dirname "${to_path}")"