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
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
composer exec -- sake dev/build