diff --git a/README.md b/README.md index f8f0e52..a940768 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ cursor leaves the position the script just commanded. ## Install ```sh -curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/install.sh | sh +curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/install.sh | sh ``` This fetches the latest `master` from Gitea, runs `bun install --production` @@ -61,7 +61,7 @@ whichever step was last commanded — by design. ## Uninstall ```sh -curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/uninstall.sh | sh +curl -fsSL https://gitea.cahlen.com/nokeo08/Move/raw/branch/master/scripts/uninstall.sh | sh ``` Removes the wrapper at `$XDG_BIN_HOME/move` and the install tree at @@ -159,11 +159,12 @@ Clone the repo and bootstrap a dev environment: ```sh git clone https://gitea.cahlen.com/nokeo08/Move.git cd Move -./dev-setup.sh +./scripts/dev-setup.sh ``` -`dev-setup.sh` verifies Bun is installed and runs `bun install` (with -devDependencies, unlike the end-user `install.sh`). +`scripts/dev-setup.sh` verifies Bun is installed and runs `bun install` +(with devDependencies, unlike the end-user `scripts/install.sh`). It +operates at the repo root regardless of the CWD you invoke it from. Run from the source tree: @@ -184,9 +185,9 @@ move --help | File | Purpose | | ------------------- | ----------------------------------------------------------------------------- | -| `install.sh` | End-user installer; curl-pipeable from Gitea. | -| `uninstall.sh` | End-user uninstaller; curl-pipeable from Gitea. | -| `dev-setup.sh` | Contributor bootstrap (verify Bun + `bun install`). | +| `scripts/install.sh` | End-user installer; curl-pipeable from Gitea. | +| `scripts/uninstall.sh` | End-user uninstaller; curl-pipeable from Gitea. | +| `scripts/dev-setup.sh` | Contributor bootstrap (verify Bun + `bun install`). | | `src/move.ts` | CLI entry point: parses args, dispatches help/version, starts the loop. | | `src/cli.ts` | Argument parsing, validation, and help/version output. | | `src/config.ts` | `Config` type, `DEFAULT_CONFIG`, and `resolveConfig` overlay. | diff --git a/dev-setup.sh b/scripts/dev-setup.sh similarity index 89% rename from dev-setup.sh rename to scripts/dev-setup.sh index f2156c6..0531a33 100755 --- a/dev-setup.sh +++ b/scripts/dev-setup.sh @@ -15,9 +15,10 @@ # Fail fast on any error, unset variable, or failed pipe stage. set -euo pipefail -# Always operate relative to the script's own directory so the install works -# regardless of the caller's CWD. -cd "$(dirname "$0")" +# Operate at the repo root regardless of the caller's CWD. This script lives +# under scripts/, so pop up one level to land at the project root before +# running bun install. +cd "$(dirname "$0")/.." echo "==> Checking for Bun..." if ! command -v bun >/dev/null 2>&1; then diff --git a/install.sh b/scripts/install.sh similarity index 100% rename from install.sh rename to scripts/install.sh diff --git a/uninstall.sh b/scripts/uninstall.sh similarity index 100% rename from uninstall.sh rename to scripts/uninstall.sh