diff --git a/infrastructure/build/image/resources/entrypoint.sh b/infrastructure/build/image/resources/entrypoint.sh index 707ea17..05c3610 100755 --- a/infrastructure/build/image/resources/entrypoint.sh +++ b/infrastructure/build/image/resources/entrypoint.sh @@ -23,8 +23,6 @@ if [[ $currentHash == $newHash ]] echo "Downloading website data" get-website-data $filename unzip-website-data $filename - echo "Executing Custom Scripts, if applicable" - execute-scripts-when-existing echo "Building website" build-website echo "Moving files" diff --git a/infrastructure/build/image/resources/functions.sh b/infrastructure/build/image/resources/functions.sh index 7ab68db..d105f6a 100644 --- a/infrastructure/build/image/resources/functions.sh +++ b/infrastructure/build/image/resources/functions.sh @@ -16,30 +16,10 @@ function unzip-website-data() { unzip $SOURCEDIR/$1 -d $BUILDDIR } -function execute-scripts-when-existing() { - websitedir=$(ls $BUILDDIR) - if [[ -f $BUILDDIR/$websitedir/$SCRIPTFILE ]] - then - checksum="$(sha256sum $BUILDDIR/$websitedir/$SCRIPTFILE | grep -oE "^[a-z0-9]+")" - if [[ "$SHA256SUM" == "$checksum" ]] - then - chmod +x $BUILDDIR/$websitedir/$SCRIPTFILE - (cd $BUILDDIR; dir=$(ls); cd $dir; ./$SCRIPTFILE) #make sure paths defined in scriptfile are relative to $dir - else - printf "Provided SHA256 Sum does not match calculated sum. Exiting." - printf "Calculated SHA256: $checksum" - printf "Given SHA256: $SHA256SUM" - exit 1 - fi - else - printf "No script file provided." - fi -} - function build-website() { - (cd $BUILDDIR; dir=$(ls); cd $dir; lein run;) + (cd $BUILDDIR; dir=$(ls); cd $dir; ./generate.sh;) } function move-website-files-to-target() { - (cd $BUILDDIR; dir=$(ls); cd $dir; rsync -ru --exclude-from "/etc/exclude.pattern" --delete resources/public/* $WEBSITEROOT;) + (cd $BUILDDIR; dir=$(ls); cd $dir; rsync -ru --exclude-from "/etc/exclude.pattern" --delete target/html/* $WEBSITEROOT;) }