From 1afe5837dee42aede77e4f8af31dfaa8996f1528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Tue, 26 Oct 2021 11:08:00 +0200 Subject: [PATCH] Add minimal __wp_cli type --- type/__wp_cli/gencode-remote | 7 +++++++ type/__wp_cli/manifest | 11 +++++++++++ type/__wp_cli/singleton | 0 3 files changed, 18 insertions(+) create mode 100644 type/__wp_cli/gencode-remote create mode 100644 type/__wp_cli/manifest create mode 100644 type/__wp_cli/singleton diff --git a/type/__wp_cli/gencode-remote b/type/__wp_cli/gencode-remote new file mode 100644 index 0000000..0a4e05e --- /dev/null +++ b/type/__wp_cli/gencode-remote @@ -0,0 +1,7 @@ +#!/bin/sh + +cat << EOF +curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o wp-cli.phar +chmod +x wp-cli.phar +mv wp-cli.phar /usr/local/bin/wp +EOF diff --git a/type/__wp_cli/manifest b/type/__wp_cli/manifest new file mode 100644 index 0000000..bf54f47 --- /dev/null +++ b/type/__wp_cli/manifest @@ -0,0 +1,11 @@ +#!/bin/sh + +os=$(cat "${__global:?}/explorer/os") +if [ "$os" != "alpine" ]; then + echo "This type is expected to run on Alpine Linux, not $os. Exiting." >&2 + exit 1 +fi + +for pkg in curl php7 php7-phar less; do + __package $pkg +done diff --git a/type/__wp_cli/singleton b/type/__wp_cli/singleton new file mode 100644 index 0000000..e69de29