mirror of
https://gh.wpcy.net/https://github.com/CaptainCore/captaincore.git
synced 2026-04-23 01:50:05 +08:00
19 lines
513 B
Bash
Executable file
19 lines
513 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Gets config from CaptainCore's Wordpress Site (captaincore_gui)
|
|
#
|
|
# captaincore config-from-api --field=<field>
|
|
#
|
|
|
|
# Load configuration
|
|
root_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"; root_path=${root_path%app*}
|
|
source ${root_path}lib/arguments
|
|
|
|
# Remove leading "--" from flags
|
|
for i in "${!flags[@]}"; do
|
|
flags[$i]=`echo ${flags[$i]} | cut -c 3-`
|
|
done
|
|
|
|
cd ${root_path}data
|
|
wp eval-file ../lib/local-scripts/api-fetch.php ${flags[@]} captaincore_gui=$captaincore_gui
|