setup-plugins: pass per-plugin install flags
HarborForge gets --install-cli, --install-monitor yes, and --openclaw-profile-path. PaddedCell, Dirigent, Yonexus get --openclaw-profile-path. ContractorAgent unchanged (no support).
This commit is contained in:
@@ -150,13 +150,31 @@ find_install_script() {
|
||||
done
|
||||
}
|
||||
|
||||
plugin_install_args() {
|
||||
local name="$1" action="$2"
|
||||
local args=("--$action")
|
||||
if [[ "$action" == "install" ]]; then
|
||||
case "$name" in
|
||||
HarborForge.OpenclawPlugin)
|
||||
args+=(--install-cli --install-monitor yes --openclaw-profile-path ~/.openclaw)
|
||||
;;
|
||||
PaddedCell|Dirigent|Yonexus.Server)
|
||||
args+=(--openclaw-profile-path ~/.openclaw)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
echo "${args[@]}"
|
||||
}
|
||||
|
||||
run_install_script() {
|
||||
local name="$1" dir="$2" action="$3"
|
||||
local script
|
||||
script=$(find_install_script "$dir")
|
||||
if [[ -n "$script" ]]; then
|
||||
log " Running $(basename "$script") --$action"
|
||||
node "$script" "--$action" || {
|
||||
local -a args
|
||||
read -ra args <<< "$(plugin_install_args "$name" "$action")"
|
||||
log " Running $(basename "$script") ${args[*]}"
|
||||
node "$script" "${args[@]}" || {
|
||||
err "$name script failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user