diff options
| author | main <main@swarm.moe> | 2026-03-19 22:57:46 -0400 |
|---|---|---|
| committer | main <main@swarm.moe> | 2026-03-19 22:57:46 -0400 |
| commit | 07588a86bc7dc66f6dbef7f87fbfaf9772cc0eda (patch) | |
| tree | 50edd400e17dd9c1b2c817deb70587c9b1e46d38 /scripts | |
| parent | f706910944ee8abe7b27a248596f7705059969d9 (diff) | |
| download | fidget_spinner-07588a86bc7dc66f6dbef7f87fbfaf9772cc0eda.zip | |
Install local CLI and skill links
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/install-codex-skill.sh | 21 | ||||
| -rwxr-xr-x | scripts/install-local.sh | 32 |
2 files changed, 32 insertions, 21 deletions
diff --git a/scripts/install-codex-skill.sh b/scripts/install-codex-skill.sh deleted file mode 100755 index dcd4121..0000000 --- a/scripts/install-codex-skill.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -SOURCE_ROOT="$ROOT_DIR/assets/codex-skills" -DEST_ROOT="${1:-$HOME/.codex/skills}" - -install_skill() { - local name="$1" - local source_dir="$SOURCE_ROOT/$name" - local dest_dir="$DEST_ROOT/$name" - mkdir -p "$DEST_ROOT" - rm -rf "$dest_dir" - ln -s "$source_dir" "$dest_dir" - printf 'installed skill symlink: %s -> %s\n' "$dest_dir" "$source_dir" -} - -install_skill "fidget-spinner" -install_skill "frontier-loop" - -printf 'mcp command: %s\n' "cargo run -p fidget-spinner-cli -- mcp serve" diff --git a/scripts/install-local.sh b/scripts/install-local.sh new file mode 100755 index 0000000..b087f70 --- /dev/null +++ b/scripts/install-local.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SKILL_SOURCE_ROOT="${ROOT_DIR}/assets/codex-skills" +LOCAL_ROOT="${1:-$HOME/.local}" +SKILL_DEST_ROOT="${2:-$HOME/.codex/skills}" +LOCAL_BIN_DIR="${LOCAL_ROOT}/bin" + +install_skill_link() { + local name="$1" + local source_dir="${SKILL_SOURCE_ROOT}/${name}" + local dest_dir="${SKILL_DEST_ROOT}/${name}" + mkdir -p "${SKILL_DEST_ROOT}" + rm -rf "${dest_dir}" + ln -s "${source_dir}" "${dest_dir}" + printf 'installed skill symlink: %s -> %s\n' "${dest_dir}" "${source_dir}" +} + +mkdir -p "${LOCAL_BIN_DIR}" + +cargo build --release -p fidget-spinner-cli --manifest-path "${ROOT_DIR}/Cargo.toml" +install -m 0755 \ + "${ROOT_DIR}/target/release/fidget-spinner-cli" \ + "${LOCAL_BIN_DIR}/fidget-spinner-cli" + +printf 'installed binary: %s\n' "${LOCAL_BIN_DIR}/fidget-spinner-cli" + +install_skill_link "fidget-spinner" +install_skill_link "frontier-loop" + +printf 'mcp command: %s\n' "${LOCAL_BIN_DIR}/fidget-spinner-cli mcp serve" |