Improve the installation script

This commit is contained in:
Manuel Thalmann 2019-04-13 17:33:06 +02:00
parent b27b359366
commit 5fc718a534

View file

@ -1,16 +1,13 @@
#!/bin/bash #!/bin/bash
appDir=$(dirname $(dirname $0))
destinationDir=$(pwd) destinationDir=$(pwd)
tempDir=$(mktemp -d) tempDir=$(mktemp -d)
sourceDir="."
cd $(dirname $0) rsync -a --delete $appDir/ $tempDir
cd ..
rsync -a --delete $sourceDir/ $tempDir
# Cleaning up the built website # Cleaning up the built website
find $tempDir \ find $tempDir \
-mindepth 1 -and \ -mindepth 1 -maxdepth 1 -and \
-name "*" -and \ -name "*" -and \
-not \( \ -not \( \
\( \ \( \
@ -26,7 +23,7 @@ find $tempDir \
# Cleaning up the destination directory # Cleaning up the destination directory
find $destinationDir \ find $destinationDir \
-mindepth 1 -and \ -mindepth 1 -maxdepth 1 -and \
-name "*" -and \ -name "*" -and \
-not -name ".env" \ -not -name ".env" \
-exec rm -rf {} + -exec rm -rf {} +
@ -37,4 +34,4 @@ rsync -a $tempDir/ $destinationDir
# Installing the website # Installing the website
cd $destinationDir cd $destinationDir
composer install composer install
./vendor/bin/sake dev/build composer exec -- sake dev/build