Merge pull request #5 from potherca-contrib/feature/support-bpkg

Adds support for installing `stub.sh` using BPKG
This commit is contained in:
2018-01-21 19:31:51 +00:00
committed by GitHub
2 changed files with 39 additions and 2 deletions

View File

@@ -7,6 +7,34 @@ with specific arguments.
Particularly useful when used in combination with the simple and elegant Particularly useful when used in combination with the simple and elegant
[assert.sh](https://github.com/lehmannro/assert.sh) test framework. [assert.sh](https://github.com/lehmannro/assert.sh) test framework.
## Installation
The `stub.sh` script can be installed in several ways:
- Downloading the "raw" `stub.sh` file from Github
- Using `bpkg`
### Downloading the `stub.sh` file
```sh
curl -LO 'https://github.com/jimeh/stub.sh/raw/master/stub.sh'
```
(Or manually open https://github.com/jimeh/stub.sh/raw/master/stub.sh in a webbrowser).
### Using bpkg
[BPKG](http://www.bpkg.io/) is a lightweight package manager for bash.
`stub.sh` is available as [bpkg](http://www.bpkg.io/) package:
```sh
bpkg install jimeh/stub.sh
```
This will install `stub.sh` at `./deps/stub.sh/stub.sh` in the directory that `bpkg` has been run in.
To install globally run: `bpkg install -g jimeh/stub.sh`
## Usage ## Usage

9
package.json Normal file
View File

@@ -0,0 +1,9 @@
{
"name": "stub.sh",
"description": "Utilities to mock/fake/stub binaries and functions for testing with BASH.",
"author": "Jim Myhrberg <contact@jimeh.me>",
"license": "MIT",
"homepage": "https://github.com/jimeh/stub.sh",
"scripts": [],
"files": ["README.md", "stub.sh"]
}