mirror of
https://ghproxy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-08-04 14:10:32 +08:00
13 lines
392 B
Bash
13 lines
392 B
Bash
#!/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)"
|