mirror of
https://ghproxy.net/https://github.com/CaptainCore/captaincore.git
synced 2025-10-04 03:00:07 +08:00
25 lines
506 B
Bash
25 lines
506 B
Bash
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Generates plugin zips on a single site.
|
|
#
|
|
# `captaincore plugins-zip <site> <plugin>...`
|
|
#
|
|
|
|
while read config; do
|
|
if [[ "$config" == "Error:"* ]]; then
|
|
continue
|
|
fi
|
|
declare "$config"
|
|
done <<< "$(php ${CAPTAINCORE_PATH}/lib/local-scripts/configs.php fetch)"
|
|
|
|
if [ ${#@} -eq 0 ]; then
|
|
echo -e "${COLOR_RED}Error:${COLOR_NORMAL} Requires a <site>"
|
|
exit
|
|
fi
|
|
|
|
site=$1
|
|
count=( $@ )
|
|
plugins=${@:2:${#@}}
|
|
|
|
captaincore ssh $site --script=plugins-zip -- --plugins="$plugins"
|