-
Notifications
You must be signed in to change notification settings - Fork 517
Install Bats Using a Package
You may be able to find Bats pre-packaged for your operating system. If available, such a package may offer a convenient alternative to cloning the Github repository:
- The installation is usually shared by all users on the system.
- The
bats
command will typically be available without configuration of any kind. - Updates and bugfixes may be provided via the regular stream of package updates for your system.
sudo add-apt-repository ppa:duggan/bats
sudo apt-get update
sudo apt-get install bats
Bats is available for openSUSE Tumbleweed (the rolling release), and will be available in the upcoming openSUSE Leap 42.1 release. To install it, run
zypper in bats
For older releases, take a look at the development project on OBS (Open Build Service). In the lower-right box you will find build results for all releases for which a Bats package is built.
For example, to install Bats on openSUSE 13.2:
-
Click on the link corresponding to the distribution.
-
Add the linked-to "download repository" as a zypper repository:
zypper ar -f http://download.opensuse.org/repositories/devel:/tools/openSUSE_13.2 devel-tools
-
Install bats the usual way:
zypper in bats
Bats is available for Arch Linux. You can install the latest release from the community repository.
sudo pacman -Sy bash-bats
The development version can be installed from AUR using your favourite AUR helper.
pacaur -Sa bats-git
Bats is available for Mac OSX using brew. If you don’t have brew already, discover it and install it here.
brew install bats