app
AI Flow: PCBWay
Public Made by Adomby adom
Prepare PCBWay RFQs, preserve manufacturing gates, track complete vendor quotes and compare assembly costs. MIT Rust CLI with Pup workflow skill.
main
Colby Knox
Publish 0.1.2
936aaff
#!/bin/bash
# adom-wiki package install hook: the binary to ~/.local/bin, the skill to ~/.claude/skills (and ~/.codex/skills).
# Builds from source when no prebuilt binary ships or it does not run here.
set -e
HERE="$(cd "$(dirname "$0")" && pwd)"
NAME="$(sed -n 's/^name = "\(.*\)"/\1/p' "$HERE/Cargo.toml" | head -1)"
if ! "$HERE/bin/$NAME" --version >/dev/null 2>&1; then
command -v cargo >/dev/null || { echo "ERROR: no prebuilt binary for this machine and no cargo to build one (https://rustup.rs)"; exit 1; }
(cd "$HERE" && cargo build --release && mkdir -p bin && cp "target/release/$NAME" "bin/$NAME")
fi
mkdir -p "$HOME/.local/bin"
install -m 755 "$HERE/bin/$NAME" "$HOME/.local/bin/.$NAME-new" && mv -f "$HOME/.local/bin/.$NAME-new" "$HOME/.local/bin/$NAME"
for skill in "$HERE"/skills/*; do
[ -f "$skill/SKILL.md" ] || continue
for consumer in .claude .codex; do mkdir -p "$HOME/$consumer/skills/$(basename "$skill")"; cp "$skill/SKILL.md" "$HOME/$consumer/skills/$(basename "$skill")/SKILL.md"; done
done
command -v adom-bridge >/dev/null 2>&1 || echo "Hint: desktop steps need adom-bridge (the Adom Bridge CLI)"
echo "OK: $NAME installed. Run '$NAME --help'."