mirror of
https://gh.wpcy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-04-23 20:16:45 +08:00
26 lines
No EOL
450 B
Bash
Executable file
26 lines
No EOL
450 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Syncs account details to CaptainCore CLI.
|
|
#
|
|
# `captaincore account sync <account_id>`
|
|
#
|
|
#
|
|
|
|
while read config; do
|
|
if [[ "$config" == "Error:"* ]]; then
|
|
continue
|
|
fi
|
|
declare "$config"
|
|
done <<< "$(php ${CAPTAINCORE_PATH}/lib/local-scripts/configs.php fetch)"
|
|
|
|
account_id=$1
|
|
|
|
run_command() {
|
|
|
|
cd ${CAPTAINCORE_PATH}/data
|
|
wp eval-file ../lib/local-scripts/account-sync.php account_id=$account_id
|
|
|
|
}
|
|
|
|
run_command |