You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
c4k-website/infrastructure/build/image/resources/entrypoint.sh

33 lines
727 B
Bash

#!/bin/bash
mkdir $BUILD_DIR
mkdir $SOURCE_DIR
set -euo pipefail
source /usr/local/bin/functions.sh
filename="website.zip"
hashfilename="hashfile"
echo "Check for new content"
touch $HASHFILE_DIR/$hashfilename
currentHash=$( cat $HASHFILE_DIR/$hashfilename )
newHash=$( get-hash-data )
if [[ $currentHash == $newHash ]]
then
echo "Nothing to do"
else
echo $currentHash > $HASHFILE_DIR/$hashfilename
echo "Generate .netrc file"
generate-netrc-file
echo "Downloading website data"
get-website-data $filename
unzip-website-data $filename
echo "Building website"
build-website
echo "Moving files"
move-website-files-to-target
fi