Rename 99-android to 20-android and improve CLAUDE.md

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 <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-06 12:09:51 +01:00
commit 2b747b6945
3 changed files with 13 additions and 6 deletions

View file

@ -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 <filename>
shellcheck <filename> # 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

View file

@ -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.