39 行
700 B
Bash
可执行文件
39 行
700 B
Bash
可执行文件
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
usage() {
|
|
cat <<'EOF'
|
|
Usage:
|
|
install_runtime_adapter.sh [target_dir]
|
|
|
|
Default target_dir:
|
|
/opt/.manus/.sandbox-runtime
|
|
|
|
Installs:
|
|
data_api.py
|
|
from this skill into the target runtime directory.
|
|
EOF
|
|
}
|
|
|
|
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
usage
|
|
exit 0
|
|
fi
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
SRC="$SCRIPT_DIR/runtime/data_api.py"
|
|
TARGET_DIR="${1:-/opt/.manus/.sandbox-runtime}"
|
|
TARGET="$TARGET_DIR/data_api.py"
|
|
|
|
if [[ ! -f "$SRC" ]]; then
|
|
echo "Source file missing: $SRC" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$TARGET_DIR"
|
|
cp -f "$SRC" "$TARGET"
|
|
chmod 755 "$TARGET"
|
|
|
|
echo "Installed runtime adapter:"
|
|
echo " $TARGET"
|