From e2e9b02bca8fbb6b5bfaed537e6fe01adef2e27e Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 9 Apr 2019 20:53:29 +0200 Subject: [PATCH] Improve the installation-script --- scripts/install.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 851f571..5a84229 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,8 +2,19 @@ cd $(dirname $0) cd .. tempDir=$(mktemp -d) -sourceDir="./Website" -find . -name "*" -and -not -name "." -and -not -name ".env" -and -not -path "$sourceDir/*" -and -not -path $sourceDir -exec rm -rf {} + +sourceDir="." + +find $sourceDir \ + -name "*" -and \ + -not \( \ + \( \ + -path "Website" + \) \ + -prune \ + \) -and \ + -not -name ".env" \ + -print + rsync -a --delete $sourceDir $tempDir rsync -a --delete $tempDir/ . rm -rf $tempDir \ No newline at end of file