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