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