From 4629fff8fb171d197eb7ddaf00d1f8a9401340f2 Mon Sep 17 00:00:00 2001 From: Julien tellier Date: Mon, 9 Oct 2017 11:42:01 +0200 Subject: [PATCH 1/4] build do not fail when cleaning up but there is no lock files --- install-plugins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-plugins.sh b/install-plugins.sh index 10031b4b99..6b521ada91 100755 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -241,7 +241,7 @@ main() { fi echo "Cleaning up locks" - rm -r "$REF_DIR"/*.lock + rm -rf "$REF_DIR"/*.lock } main "$@" From 36fe0daca2c24f567613282507faaedd3b39be2f Mon Sep 17 00:00:00 2001 From: Julien Tellier Date: Fri, 13 Oct 2017 18:35:30 +0200 Subject: [PATCH 2/4] delete only lockfiles without force if they are present --- install-plugins.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install-plugins.sh b/install-plugins.sh index 6b521ada91..8bf2434522 100755 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -241,7 +241,10 @@ main() { fi echo "Cleaning up locks" - rm -rf "$REF_DIR"/*.lock + find . -iregex "$REF_DIR/.*.lock" | while read filepath; do + rm -r "$filepath" + done + } main "$@" From 20efae0596b95997d02d33925cabb744793312ce Mon Sep 17 00:00:00 2001 From: Julien Tellier Date: Fri, 13 Oct 2017 18:42:49 +0200 Subject: [PATCH 3/4] read of find lockfiles with -r to avoid mangling backslashes --- install-plugins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-plugins.sh b/install-plugins.sh index 8bf2434522..405458e292 100755 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -241,7 +241,7 @@ main() { fi echo "Cleaning up locks" - find . -iregex "$REF_DIR/.*.lock" | while read filepath; do + find . -iregex "$REF_DIR/.*.lock" | while read -r filepath; do rm -r "$filepath" done From a1a9790a72bf6cc6a69a7ac7974013e3e5646b3e Mon Sep 17 00:00:00 2001 From: Julien Tellier Date: Sat, 14 Oct 2017 11:08:33 +0200 Subject: [PATCH 4/4] using -regex instead of -iregex to be compatible with docker-alpine --- install-plugins.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-plugins.sh b/install-plugins.sh index 405458e292..e20ae9b193 100755 --- a/install-plugins.sh +++ b/install-plugins.sh @@ -241,7 +241,7 @@ main() { fi echo "Cleaning up locks" - find . -iregex "$REF_DIR/.*.lock" | while read -r filepath; do + find "$REF_DIR" -regex ".*.lock" | while read -r filepath; do rm -r "$filepath" done