From 6bd3bf2b5013e9594a0c25a69aabde1647eaab7f Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 19 Mar 2020 12:09:50 +0000 Subject: [PATCH] update README --- README.md | 5 ++--- incorporate-this.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 incorporate-this.sh diff --git a/README.md b/README.md index eeb577b..505a872 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,9 @@ TODO ## TODO -* implement option to not have remote url include hostname (i.e., bare domain) -* convert scripts to use ssh pipes/bash here documents. - see [ssh pipes](https://stackoverflow.com/a/4412324), [Bash Here Document](https://stackoverflow.com/a/4412338) * Script to export database from production database * Script to export wordpress directory from production * Script to set up local container using exported database/wordpress installation * Refactor duplicated code (e.g., creating containers, exporting data) +* convert all scripts to use ssh pipes/bash here documents. + see [ssh pipes](https://stackoverflow.com/a/4412324), [Bash Here Document](https://stackoverflow.com/a/4412338) diff --git a/incorporate-this.sh b/incorporate-this.sh new file mode 100755 index 0000000..7636795 --- /dev/null +++ b/incorporate-this.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +. ./env.sh + +ssh "$remote_username@$remote_url" wget -O testdata.xml 'https://raw.githubusercontent.com/WPTRT/theme-unit-test/master/themeunittestdata.wordpress.xml' + +ssh "$remote_username@$remote_url" wp "--path=$remote_path" \ + import testdata.xml \ + --authors=create + +ssh "$remote_username@$remote_url" rm testdata.xml