2022-09-23 13:39:17 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-03-11 13:41:15 +00:00
|
|
|
mkdir $BUILDDIR
|
|
|
|
mkdir $SOURCEDIR
|
2022-09-28 12:32:41 +00:00
|
|
|
|
2022-12-09 08:50:13 +00:00
|
|
|
set -euo pipefail
|
2022-11-11 12:27:28 +00:00
|
|
|
|
2022-09-23 13:39:17 +00:00
|
|
|
source /usr/local/bin/functions.sh
|
|
|
|
|
2022-12-02 08:37:03 +00:00
|
|
|
filename="website.zip"
|
|
|
|
hashfilename="hashfile"
|
|
|
|
|
|
|
|
echo "Check for new content"
|
2024-03-11 13:41:15 +00:00
|
|
|
touch $HASHFILEDIR/$hashfilename
|
|
|
|
currentHash=$( cat $HASHFILEDIR/$hashfilename )
|
2022-12-09 08:50:13 +00:00
|
|
|
newHash=$( get-hash-data )
|
|
|
|
|
|
|
|
if [[ $currentHash == $newHash ]]
|
2022-12-02 08:37:03 +00:00
|
|
|
then
|
2022-12-02 09:36:44 +00:00
|
|
|
echo "Nothing to do"
|
2022-12-09 09:49:57 +00:00
|
|
|
else
|
2024-03-11 13:41:15 +00:00
|
|
|
echo $currentHash > $HASHFILEDIR/$hashfilename
|
2024-03-06 14:35:11 +00:00
|
|
|
echo "Generate .netrc file"
|
|
|
|
generate-netrc-file
|
2022-12-09 08:50:13 +00:00
|
|
|
echo "Downloading website data"
|
|
|
|
get-website-data $filename
|
2022-12-02 09:36:44 +00:00
|
|
|
unzip-website-data $filename
|
|
|
|
echo "Building website"
|
|
|
|
build-website
|
|
|
|
echo "Moving files"
|
|
|
|
move-website-files-to-target
|
2022-12-02 08:37:03 +00:00
|
|
|
fi
|