From 5fc718a534e1cd43b12d4e7adc492b5a7a513c78 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 13 Apr 2019 17:33:06 +0200 Subject: [PATCH] Improve the installation script --- scripts/install.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index b57daea..c9e6cd2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,16 +1,13 @@ #!/bin/bash +appDir=$(dirname $(dirname $0)) destinationDir=$(pwd) tempDir=$(mktemp -d) -sourceDir="." -cd $(dirname $0) -cd .. - -rsync -a --delete $sourceDir/ $tempDir +rsync -a --delete $appDir/ $tempDir # Cleaning up the built website find $tempDir \ - -mindepth 1 -and \ + -mindepth 1 -maxdepth 1 -and \ -name "*" -and \ -not \( \ \( \ @@ -26,7 +23,7 @@ find $tempDir \ # Cleaning up the destination directory find $destinationDir \ - -mindepth 1 -and \ + -mindepth 1 -maxdepth 1 -and \ -name "*" -and \ -not -name ".env" \ -exec rm -rf {} + @@ -37,4 +34,4 @@ rsync -a $tempDir/ $destinationDir # Installing the website cd $destinationDir composer install -./vendor/bin/sake dev/build \ No newline at end of file +composer exec -- sake dev/build \ No newline at end of file