Delete hidden files at deploy (excluding sunlink)

This commit is contained in:
Florine W. Dekker 2022-08-29 01:25:00 +02:00
parent 6df8061633
commit e514af0814
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
2 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,8 @@ fi
if [ "$delete_target" = true ]; then
echo "[[ Deploy ]] Deleting then recreating '$dst_dir'."
rm -rf "${dst_dir:?}/**"
# shellcheck disable=SC2086
rm -rf ${dst_dir:?}/..?* ${dst_dir:?}/.[!.]* ${dst_dir:?}/**
chmod g+w "$dst_dir"
fi

View File

@ -42,7 +42,8 @@ fi
if [ "$delete_target" = true ]; then
echo "[[ Deploy ]] Deleting then recreating '$dst_dir'."
rm -rf "${dst_dir:?}/**"
# shellcheck disable=SC2086
rm -rf ${dst_dir:?}/..?* ${dst_dir:?}/.[!.]* ${dst_dir:?}/**
chmod g+w "$dst_dir"
fi