Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Improve `assert_have_been_called_with` with strict argument matching
- Make Windows install clearer in the docs by adding an option for Linux/Mac and another one for Windows.

## [0.23.0](https://github.com/TypedDevs/bashunit/compare/0.22.3...0.23.0) - 2025-08-03

Expand Down
66 changes: 62 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,24 @@ bashunit requires **Bash 3.2** or newer.

There is a tool that will generate an executable with the whole library in a single file:

```bash
::: code-group
```bash [Linux/Mac]
curl -s https://bashunit.typeddevs.com/install.sh | bash
```

```bash [Windows]
# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
# - Open PowerShell as Administrator
# - Run: wsl --install
# - Restart your computer
#
# Step 2: Open your WSL terminal and run:
curl -s https://bashunit.typeddevs.com/install.sh | bash
```
:::

This will create a file inside a lib folder, such as `lib/bashunit`.

#### Verify
Expand All @@ -37,9 +51,24 @@ https://github.com/TypedDevs/bashunit/releases/download/{{ pkg.version }}/checks

The installation script can receive arguments (in any order):

```bash
::: code-group
```bash [Linux/Mac]
curl -s https://bashunit.typeddevs.com/install.sh | bash -s [dir] [version]
```

```bash [Windows]
# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
# - Open PowerShell as Administrator
# - Run: wsl --install
# - Restart your computer
#
# Step 2: Open your WSL terminal and run:
curl -s https://bashunit.typeddevs.com/install.sh | bash -s [dir] [version]
```
:::

- `[dir]`: the destiny directory to save the executable bashunit; `lib` by default
- `[version]`: the [release](https://github.com/TypedDevs/bashunit/releases) to download, for instance `{{ pkg.version }}`; `latest` by default.

Expand All @@ -58,7 +87,36 @@ You can manage your dependencies using [bashdep](https://github.com/Chemaclass/b
a simple dependency manager for bash.

::: code-group
```bash-vue [install-dependencies.sh]
```bash-vue [Linux/Mac - install-dependencies.sh]
# Ensure bashdep is installed
[ ! -f lib/bashdep ] && {
mkdir -p lib
curl -sLo lib/bashdep \
https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep
chmod +x lib/bashdep
}

# Add latest bashunit release to your dependencies
DEPENDENCIES=(
"https://github.com/TypedDevs/bashunit/releases/download/{{ pkg.version }}/bashunit"
)

# Load, configure and run bashdep
source lib/bashdep
bashdep::setup dir="lib" silent=false
bashdep::install "${DEPENDENCIES[@]}"
```

```bash-vue [Windows - install-dependencies.sh]
# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
# - Open PowerShell as Administrator
# - Run: wsl --install
# - Restart your computer
#
# Step 2: Open your WSL terminal and run:

# Ensure bashdep is installed
[ ! -f lib/bashdep ] && {
mkdir -p lib
Expand All @@ -85,7 +143,7 @@ Downloading 'bashunit' to 'lib'...

## Brew

You can install **bashunit** globally in your macOS (or Linux) using brew.
You can install **bashunit** globally on macOS or Linux using brew.

```bash
brew install bashunit
Expand Down
16 changes: 15 additions & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,23 @@ Thanks to **bashunit**, verifying and validating your Bash code has never been s

There is a tool that will generate an executable with the whole library in a single file:

```bash
::: code-group
```bash [Linux/Mac]
curl -s https://bashunit.typeddevs.com/install.sh | bash
```

```bash [Windows]
# IMPORTANT: You need WSL (Windows Subsystem for Linux) to run bashunit
#
# Step 1: Install WSL if you haven't already
# - Open PowerShell as Administrator
# - Run: wsl --install
# - Restart your computer
#
# Step 2: Open your WSL terminal and run:
curl -s https://bashunit.typeddevs.com/install.sh | bash
```
:::

This will create a file inside a lib folder, such as `lib/bashunit`.

Expand Down
Loading