From 60f023a31a41afc18510a82f41ab2657ede0f546 Mon Sep 17 00:00:00 2001 From: cpina Date: Sun, 29 Mar 2020 17:49:16 +0200 Subject: [PATCH] Fixes deleting too many files --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index fd088aa..a3523a2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -16,7 +16,7 @@ git clone "https://$API_TOKEN_GITHUB@github.com/$GITHUB_USERNAME/$GITHUB_REPO.gi ls -la "$CLONE_DIR" # Copy files into the git and deletes all git -find "$CLONE_DIR" | grep -v "^$CLONE_DIR/\.git" | xargs rm -rf # delete all files (to handle deletions) +find "$CLONE_DIR" | grep -v "^$CLONE_DIR/\.git" | grep -v "^$CLONE_DIR$" | xargs rm -rf # delete all files (to handle deletions) ls -la "$CLONE_DIR"