captaincore/app/account/sync
2021-11-10 09:41:21 -05:00

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