Installation
Although there's no Bash script dependency manager like npm for JavaScript, Maven for Java, pip for Python, or composer for PHP; you can add bashunit as a dependency in your repository according to your preferences.
Here, we provide different options that you can use to install bashunit in your application.
install.sh
There is a tool that will generate an executable with the whole library in a single file:
curl -s https://bashunit.typeddevs.com/install.sh | bash
This will create a file inside a lib folder, such as lib/bashunit
.
Define custom tag and folder
The installation script can receive two optional arguments:
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 to download, for instance0.11.0
;latest
by default
TIP
You can use beta
as [version]
to get the next non-stable preview release. We try to keep it stable, but there is no promise that we won't change functions or their signatures without prior notice.
TIP
Committing (or not) this file to your project it's up to you. In the end, it is a dev dependency.
Brew
You can install bashunit globally in your macOS (or Linux) using brew.
brew install bashunit
MacPorts
On macOS, you can also install bashunit via MacPorts:
sudo port install bashunit