mirror of
https://gh.wpcy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-04-22 22:40:22 +08:00
13 lines
392 B
Bash
Executable file
13 lines
392 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Export select ids from CaptainCore CLI master
|
|
#
|
|
|
|
site_ids_to_sync=$@
|
|
function join_by { local IFS="$1"; shift; echo "$*"; }
|
|
site_ids=$(join_by , ${site_ids_to_sync})
|
|
|
|
cd ~/.captaincore/data/
|
|
wp db export - --no-create-info=true --tables=wp_posts --where="ID in ($site_ids)"
|
|
wp db export - --no-create-info=true --tables=wp_postmeta --where="post_id in ($site_ids)"
|