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.
23 lines
934 B
Bash
23 lines
934 B
Bash
#!/bin/sh
|
|
|
|
ROOT="$(dirname $0)"
|
|
VENDOR="${ROOT}/vendor"
|
|
CADDY="${VENDOR}/caddy"
|
|
HUGO="${VENDOR}/hugo"
|
|
|
|
if [ ! -e "$CADDY" ]; then
|
|
curl -L "https://caddyserver.com/download/linux/amd64?plugins=dns,hook.service,http.awslambda,http.cgi,http.cors,http.expires,http.filemanager,http.filter,http.git,http.hugo,http.ipfilter,http.jwt,http.mailout,http.minify,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.upload,net,tls.dns.rfc2136" \
|
|
| tar -C "$(dirname "$CADDY")" -xz caddy
|
|
chmod a+x "$CADDY"
|
|
fi
|
|
|
|
if [ ! -e "$HUGO" ]; then
|
|
curl -L "https://github.com/spf13/hugo/releases/download/v0.19/hugo_0.19_Linux-64bit.tar.gz" \
|
|
| tar -C "$VENDOR" --strip-components=1 -xz hugo_0.19_linux_amd64/hugo_0.19_linux_amd64
|
|
mv "${VENDOR}/hugo_0.19_linux_amd64" "$HUGO"
|
|
chmod a+x "$HUGO"
|
|
fi
|
|
|
|
export ANSIBLE_CFG="${ROOT}/ansible.cfg"
|
|
exec ansible-playbook -i ${ROOT}/inventory --extra-vars @secrets/main.yaml "$@" site.yaml
|