feat: add bats tests, docs (#139)

* fix(test): ensure bats file list uses xargs

* docs(readme): use yarn for testing instructions

* fix(test): ensure pipelines fail properly

* docs(alias): fix table header

---------

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
2025-06-30 04:30:06 +03:00
committed by GitHub
parent 1531647e01
commit cf7ca2109f
82 changed files with 1368 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
# create-aerospace-keymaps
Generates `docs/aerospace-keybindings.md` using `aerospace config --json`.
## Usage
```bash
scripts/create-aerospace-keymaps.php
```
Requires the `aerospace` CLI tool to be installed.

View File

@@ -0,0 +1,11 @@
# create-nvim-keymaps
Outputs current Neovim key mappings to `docs/nvim-keybindings.md`.
## Usage
```bash
scripts/create-nvim-keymaps.sh
```
Requires Neovim to be installed.

View File

@@ -0,0 +1,11 @@
# create-wezterm-keymaps
Generates `docs/wezterm-keybindings.md` by invoking `wezterm show-keys`.
## Usage
```bash
scripts/create-wezterm-keymaps.sh
```
Requires wezterm to be installed.

View File

@@ -0,0 +1,12 @@
# install-cargo-packages
Install Rust packages listed in `config/asdf/cargo-packages`.
## Usage
```bash
scripts/install-cargo-packages.sh
```
The script installs each package with `cargo install` and runs
`cargo-install-update` when available to update existing packages.

View File

@@ -0,0 +1,12 @@
# install-cheat-purebashbible
Fetches the Pure Bash Bible repository and installs its cheatsheets for the
`cheat` utility.
## Usage
```bash
scripts/install-cheat-purebashbible.sh
```
Requires `git` and `cheat` to be available in PATH.

View File

@@ -0,0 +1,11 @@
# install-composer
Installs the PHP package manager [Composer](https://getcomposer.org/).
## Usage
```bash
scripts/install-composer.sh
```
The script downloads the latest Composer PHAR and places it in `$HOME/.local/bin`.

11
scripts/install-fonts.md Normal file
View File

@@ -0,0 +1,11 @@
# install-fonts
Installs Nerd Fonts used by various terminal and editor setups.
## Usage
```bash
scripts/install-fonts.sh
```
Fonts are downloaded to `$HOME/.local/share/fonts` and refreshed automatically.

View File

@@ -0,0 +1,12 @@
# install-gh-extensions
Installs a curated set of GitHub CLI extensions defined in
`config/gh/extensions`.
## Usage
```bash
scripts/install-gh-extensions.sh
```
The script installs each extension using the `gh extension install` command.

View File

@@ -0,0 +1,12 @@
# install-git-crypt
Installs `git-crypt` for transparent encryption of files in Git repositories.
## Usage
```bash
scripts/install-git-crypt.sh
```
After installation you can run `git-crypt init` inside a repository to begin
encrypting files.

View File

@@ -0,0 +1,12 @@
# install-go-packages
Installs Go binaries defined in `config/go/packages`.
## Usage
```bash
scripts/install-go-packages.sh
```
The script uses `go install` for each package path listed in the configuration
file.

View File

@@ -0,0 +1,11 @@
# install-macos-defaults
Applies a set of macOS defaults for a consistent developer environment.
## Usage
```bash
scripts/install-macos-defaults.sh
```
Requires macOS and the `defaults` command.

View File

@@ -0,0 +1,11 @@
# install-npm-packages
Installs global npm packages listed in `config/npm/packages`.
## Usage
```bash
scripts/install-npm-packages.sh
```
Uses `npm install -g` for each package in the configuration file.

11
scripts/install-ntfy.md Normal file
View File

@@ -0,0 +1,11 @@
# install-ntfy
Installs the lightweight notification tool [`ntfy`](https://ntfy.sh/).
## Usage
```bash
scripts/install-ntfy.sh
```
After running you can send notifications using `ntfy publish`.

View File

@@ -0,0 +1,11 @@
# install-pip-packages
Installs Python packages from `config/pip/packages` using `pip`.
## Usage
```bash
scripts/install-pip-packages.sh
```
The script uses `pip install --user` for each package entry.

View File

@@ -0,0 +1,11 @@
# install-xcode-cli-tools
Installs the Xcode Command Line Tools on macOS using `osascript` prompts.
## Usage
```bash
scripts/install-xcode-cli-tools.sh
```
Requires macOS with administrator privileges.

11
scripts/install-z.md Normal file
View File

@@ -0,0 +1,11 @@
# install-z
Installs [z](https://github.com/rupa/z), a directory jumping tool.
## Usage
```bash
scripts/install-z.sh
```
Once installed add `. ~/.z` to your shell startup file to enable the command.

13
scripts/shared.md Normal file
View File

@@ -0,0 +1,13 @@
# shared
Collection of helper functions shared across install scripts.
## Usage
Source the file in your script:
```bash
source "${DOTFILES}/scripts/shared.sh"
```
Provides messaging helpers and common environment checks.

View File

@@ -10,6 +10,7 @@
[ -z "$SHARED_SCRIPTS_SOURCED" ] && {
source "${DOTFILES}/config/shared.sh"
# Warn the user if the shared configuration hasn't been loaded yet
msgr warn "(!) shared.sh not sourced"
# Set variable that checks if the shared.sh script has been

View File

@@ -0,0 +1,11 @@
# update-readme-aliases
Regenerates the alias table located at `docs/alias.md`.
## Usage
```bash
scripts/update-readme-aliases.sh
```
This script parses `config/alias` and writes the markdown table to the docs.