From e514af081468d9b6c579f17d241e069b759e0700 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Mon, 29 Aug 2022 01:25:00 +0200 Subject: [PATCH] Delete hidden files at deploy (excluding sunlink) --- deploy-npm | 3 ++- deploy-static | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy-npm b/deploy-npm index 4f31b17..532498e 100755 --- a/deploy-npm +++ b/deploy-npm @@ -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 diff --git a/deploy-static b/deploy-static index 7860269..6075b7f 100755 --- a/deploy-static +++ b/deploy-static @@ -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