2019-05-11 19:20:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
|
|
|
url="https://github.com/WordPress/WordPress/archive/${WP_VERSION}.tar.gz"
|
|
|
|
packages=(
|
2019-05-11 21:52:57 +00:00
|
|
|
php7-curl
|
2019-05-11 19:20:19 +00:00
|
|
|
php7-gd
|
2019-12-23 00:14:29 +00:00
|
|
|
php7-json
|
2019-05-11 19:20:19 +00:00
|
|
|
php7-mysqli
|
|
|
|
php7-opcache
|
|
|
|
php7-zip
|
|
|
|
)
|
|
|
|
|
|
|
|
function cleanup() {
|
|
|
|
rm -rf \
|
|
|
|
/tmp/wp.tgz
|
|
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
function step() {
|
|
|
|
echo "$@..." >&2
|
|
|
|
}
|
|
|
|
|
|
|
|
step "Downloading wordpress release ${WP_VERSION}"
|
|
|
|
curl -sSfLo /opt/wp.tgz "${url}"
|
|
|
|
echo "${WP_CHECKSUM} /opt/wp.tgz" | sha256sum -c
|
|
|
|
|
|
|
|
step "Installing required packages"
|
|
|
|
apk --no-cache add "${packages[@]}"
|