From 372de06b4363d38d92c503cc96103b6a879c2820 Mon Sep 17 00:00:00 2001 From: Naoaki Ueda Date: Sun, 4 Sep 2022 18:23:17 +0900 Subject: Initial commit --- misc/vaultpress.makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 misc/vaultpress.makefile (limited to 'misc/vaultpress.makefile') diff --git a/misc/vaultpress.makefile b/misc/vaultpress.makefile new file mode 100644 index 0000000..6fe6989 --- /dev/null +++ b/misc/vaultpress.makefile @@ -0,0 +1,16 @@ + +WP_PATH = $(patsubst %/,%,$(HTML_DIR)/$(WP_INSTALL_DIR)) + +wp-includes = $(WP_PATH)/wp-includes + +$(wp-includes): + $(DOCKER) run --rm -- docker.io/library/wordpress:$(WP_IMAGE_TAG) tar -cf - --exclude wp-content . \ + | tar -C $(WP_PATH) -xvf - + +.PHONY: extract +extract: | $(wp-includes) + $(if $(wildcard $(file)),,$(error usage: make extract file=)) + $(TAR) -C $(SQL_DIR)/ -xvzf $(file) --strip-components 1 sql/ + $(TAR) -C $(WP_PATH)/ -xvzf $(file) --exclude sql/ --exclude wp-config.php + [[ -e "$(WP_PATH)/wp-config.php" ]] || \ + $(TAR) -C $(WP_PATH)/ -xvzf $(file) wp-config.php -- cgit v1.2.3-54-g00ecf