#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" # Prerequisite: auth-rt binary must be installed if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.openclaw/bin/auth-rt" ]; then echo "ERROR: auth-rt not found. Install it:" echo " cd ~/clawd/skills/auth-runtime && ./install.sh" exit 1 fi echo "Building 1688-product-master..." bun build scripts/run.ts --outfile dist/run.js --target bun DEST="${1:-$HOME/.openclaw/skills}" SKILL_NAME="1688-product-master" mkdir -p "$DEST/$SKILL_NAME" cp dist/run.js "$DEST/$SKILL_NAME/run.js" echo "Installed: $DEST/$SKILL_NAME/run.js"