2026-03-11 23:36:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
2026-03-20 10:36:46 +00:00
|
|
|
# Auto-install auth-rt if not found
|
2026-03-20 12:34:21 +00:00
|
|
|
_AUTH_RT_SRC="$HOME/.local/share/auth-runtime"
|
2026-03-20 10:36:46 +00:00
|
|
|
if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then
|
|
|
|
|
echo "auth-rt not found, installing..."
|
2026-03-20 12:34:21 +00:00
|
|
|
if [ -d "$_AUTH_RT_SRC/.git" ]; then
|
|
|
|
|
git -C "$_AUTH_RT_SRC" pull --ff-only
|
|
|
|
|
else
|
|
|
|
|
git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_AUTH_RT_SRC"
|
|
|
|
|
fi
|
|
|
|
|
bash "$_AUTH_RT_SRC/install.sh"
|
2026-03-20 06:38:03 +00:00
|
|
|
fi
|
2026-03-19 22:56:29 +00:00
|
|
|
|
2026-03-20 06:38:03 +00:00
|
|
|
echo "Building 1688-product-master..."
|
2026-03-11 23:36:59 +00:00
|
|
|
bun build scripts/run.ts --outfile dist/run.js --target bun
|
|
|
|
|
|
2026-03-20 06:38:03 +00:00
|
|
|
DEST="${1:-$HOME/.openclaw/skills}"
|
|
|
|
|
SKILL_NAME="1688-product-master"
|
2026-03-11 23:36:59 +00:00
|
|
|
mkdir -p "$DEST/$SKILL_NAME"
|
|
|
|
|
cp dist/run.js "$DEST/$SKILL_NAME/run.js"
|
|
|
|
|
|
|
|
|
|
echo "Installed: $DEST/$SKILL_NAME/run.js"
|