add hugo to image & generate netrc file
This commit is contained in:
parent
d496ba28f6
commit
600dd1c30a
3 changed files with 8 additions and 1 deletions
|
@ -20,6 +20,8 @@ if [[ $currentHash == $newHash ]]
|
||||||
echo "Nothing to do"
|
echo "Nothing to do"
|
||||||
else
|
else
|
||||||
echo $currentHash > $HASHFILEDIR/$hashfilename
|
echo $currentHash > $HASHFILEDIR/$hashfilename
|
||||||
|
echo "Generate .netrc file"
|
||||||
|
generate-netrc-file
|
||||||
echo "Downloading website data"
|
echo "Downloading website data"
|
||||||
get-website-data $filename
|
get-website-data $filename
|
||||||
unzip-website-data $filename
|
unzip-website-data $filename
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# TODO provide GITHOST
|
||||||
|
function generate-netrc-file() {
|
||||||
|
echo "machine $GITHOST password $AUTHTOKEN" > ~/.netrc
|
||||||
|
}
|
||||||
|
|
||||||
function get-website-data() {
|
function get-website-data() {
|
||||||
curl -H "Authorization: token $AUTHTOKEN" -o $SOURCEDIR/$1 $GITREPOURL
|
curl -H "Authorization: token $AUTHTOKEN" -o $SOURCEDIR/$1 $GITREPOURL
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ function main()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
upgradeSystem
|
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 -d /etc/lein/
|
||||||
install -m 0700 /tmp/entrypoint.sh /
|
install -m 0700 /tmp/entrypoint.sh /
|
||||||
|
|
Loading…
Reference in a new issue