#!/bin/bash set -e BASE_URL="https://cnb.cool/ninvfeng/aibox/docker/-/git/raw/main/scripts" COMPONENTS=(php redis playwright openclaw uv openscad tmux) show_help() { echo "Usage: curl ${BASE_URL}/install.sh | bash -s " echo "" echo "Available components:" for c in "${COMPONENTS[@]}"; do echo " - $c" done echo "" echo "Examples:" echo " curl ${BASE_URL}/install.sh | bash -s php redis" echo " curl ${BASE_URL}/install.sh | bash -s uv" } install_component() { local name="$1" local url="${BASE_URL}/install-${name}.sh" echo "==> Installing ${name} ..." curl -fsSL "$url" | bash echo "==> ${name} done." echo "" } if [ $# -eq 0 ]; then show_help exit 0 fi for arg in "$@"; do matched=false for c in "${COMPONENTS[@]}"; do if [ "$arg" = "$c" ]; then matched=true break fi done if [ "$matched" = false ]; then echo "Unknown component: $arg" show_help exit 1 fi install_component "$arg" done