add hugo to image & generate netrc file

This commit is contained in:
Clemens 2024-03-06 15:35:11 +01:00
parent d496ba28f6
commit 600dd1c30a
3 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,8 @@ if [[ $currentHash == $newHash ]]
echo "Nothing to do"
else
echo $currentHash > $HASHFILEDIR/$hashfilename
echo "Generate .netrc file"
generate-netrc-file
echo "Downloading website data"
get-website-data $filename
unzip-website-data $filename

View file

@ -1,5 +1,10 @@
#!/bin/bash
# TODO provide GITHOST
function generate-netrc-file() {
echo "machine $GITHOST password $AUTHTOKEN" > ~/.netrc
}
function get-website-data() {
curl -H "Authorization: token $AUTHTOKEN" -o $SOURCEDIR/$1 $GITREPOURL
}

View file

@ -6,7 +6,7 @@ function main()
{
{
upgradeSystem
apt-get install -qqy unzip rsync jq imagemagick curl
apt-get install -qqy unzip rsync jq imagemagick curl hugo
install -d /etc/lein/
install -m 0700 /tmp/entrypoint.sh /