From 8dc73c943238787e2c6de622f27c61f9ce7f6c75 Mon Sep 17 00:00:00 2001 From: Alexander Kabenin Date: Wed, 27 Jul 2022 18:14:07 -0700 Subject: [PATCH 1/2] Use find to delete files instead of rm globbing may be a problem with big workspaces and files having names starting with dash may be interpated as a swith to rm. Using find resolves both issues. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 2983f58..b1f9252 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,5 +5,5 @@ set -e # fail on error # include hidden files # https://askubuntu.com/questions/740805/how-can-i-remove-all-files-from-current-directory-using-terminal shopt -s dotglob -rm -rf * +find . -delete From bfec3fad0a645b8452e7408df80fb391f50f3afc Mon Sep 17 00:00:00 2001 From: Alexander Kabenin Date: Mon, 1 Aug 2022 09:05:29 -0700 Subject: [PATCH 2/2] No need in updating shell options to include dot files to glob when using find --- entrypoint.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b1f9252..787b3cc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,8 +2,5 @@ set -e # fail on error -# include hidden files -# https://askubuntu.com/questions/740805/how-can-i-remove-all-files-from-current-directory-using-terminal -shopt -s dotglob find . -delete