diff options
author | Naoaki Ueda <nao@uedder.com> | 2022-09-04 18:23:17 +0900 |
---|---|---|
committer | Naoaki Ueda <nao@uedder.com> | 2022-09-04 18:23:17 +0900 |
commit | 372de06b4363d38d92c503cc96103b6a879c2820 (patch) | |
tree | 8114a32239e3ad98d53284d31fc6ff7f6b2b27d2 /misc | |
download | wordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.tar.gz wordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.tar.bz2 wordpress-dev-372de06b4363d38d92c503cc96103b6a879c2820.zip |
Initial commit
Diffstat (limited to 'misc')
-rw-r--r-- | misc/disable-really-simple-ssl.makefile | 9 | ||||
-rw-r--r-- | misc/vaultpress.makefile | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/misc/disable-really-simple-ssl.makefile b/misc/disable-really-simple-ssl.makefile new file mode 100644 index 0000000..b8789c2 --- /dev/null +++ b/misc/disable-really-simple-ssl.makefile @@ -0,0 +1,9 @@ +WP_PATH = $(patsubst %/,%,$(HTML_DIR)/$(WP_INSTALL_DIR)) +URL_BASE = $(patsubst %/,%,$(LOCAL_URL)/$(WP_INSTALL_DIR)) + +.PHONY: disable-ssl +disable-ssl: deactive-file = $(shell find $(WP_PATH)/wp-content/plugins -name force-deactivate.txt) +disable-ssl: + $(if $(wildcard $(deactive-file)),, $(error force-deactivate.txt: not found)) + cp $(deactive-file) $(basename $(deactive-file)).php + @echo "Success, don't forget to access \`$(URL_BASE)/wp-content/plugins/really-simple-ssl/force-deactivate.php\` to disable SSL." 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 file from VaultPress>)) + $(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 |