From 2b747b6945ffe537d39ffb3c3ded442f7fccab9b Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Fri, 6 Mar 2026 12:09:51 +0100 Subject: [PATCH] Rename 99-android to 20-android and improve CLAUDE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 99-android was not a credential file — it sets up Android SDK paths and belongs with other build tools. Also updated CLAUDE.md with validate-all command, test instructions, and clearer permission rules. Co-Authored-By: Claude Opus 4.6 --- 99-android => 20-android | 0 CLAUDE.md | 13 ++++++++++--- README.md | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) rename 99-android => 20-android (100%) diff --git a/99-android b/20-android similarity index 100% rename from 99-android rename to 20-android diff --git a/CLAUDE.md b/CLAUDE.md index 2185ee7..bde6283 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -35,14 +35,21 @@ Use these in all scripts — do not manipulate `PATH` or check permissions manua ## Permissions - Directory `~/.bash.d/` itself: mode `700` -- Regular scripts: mode `755` (executable is **required** for sourcing) -- Credential files (`99-*`): mode `700` and must call `require_private "${BASH_SOURCE[0]}"` as the first functional line +- Regular scripts (`00-*` through `50-*`): mode `755` (executable is **required** for sourcing) +- Credential files (`99-*` with secrets): mode `700` and must call `require_private "${BASH_SOURCE[0]}"` as the first functional line +- Non-credential config files (e.g. `20-android`): mode `755` like regular scripts ## Validation Validate all shell scripts with shellcheck before committing: ```bash -shellcheck +shellcheck # single file +shellcheck [0-9][0-9]-* # all scripts at once +``` + +To test changes, open a new shell or source a single file: +```bash +source ~/.bash.d/20-ninja # reload one file in the current shell ``` ## Security diff --git a/README.md b/README.md index 4f2d48d..4401002 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Files are sourced in **lexicographic order**, so numeric prefixes control the lo | `20-` | Build tool settings | `20-ninja` | | `30-` | Shell/prompt setup | `30-starship` | | `50-` | Shell completions | `50-claude-completion` | -| `99-` | Credentials and app config (last)| `99-gemini`, `99-huggingface` | +| `99-` | Credentials (last) | `99-gemini`, `99-huggingface` | Lower numbers load first, so foundational pieces like helper functions (`00-`) and PATH entries (`10-`) are available before anything that depends on them. @@ -44,6 +44,7 @@ Lower numbers load first, so foundational pieces like helper functions (`00-`) a ### Build Tools (`20-`) +- **`20-android`** — Sets `$ANDROID_HOME`, `$JAVA_HOME`, and adds Android SDK tools to PATH (only when installed). - **`20-ninja`** — Configures Ninja as the default CMake generator and enables ccache for C/C++ builds (only when installed). - **`20-oneapi`** — Sources the Intel oneAPI environment and adds its libraries to `LD_LIBRARY_PATH`. @@ -59,9 +60,8 @@ Lower numbers load first, so foundational pieces like helper functions (`00-`) a - **`50-tailscale-completion`** — Tab completion for Tailscale. - **`50-uv-completion`** — Tab completion for [uv](https://github.com/astral-sh/uv) (Python package manager). -### Credentials & App Config (`99-`) +### Credentials (`99-`) -- **`99-android`** — Sets `$ANDROID_HOME`, `$JAVA_HOME`, and adds Android SDK tools to PATH (only when installed). - **`99-claude.example`** — Template for Forgejo issue token for Claude Code integrations. - **`99-gemini.example`** — Template for Gemini API key. - **`99-google.example`** — Template for Google API key.