1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-12-25 14:09:43 +01:00
8 Install Bats Using a Package
Patrick Hobusch edited this page 2017-03-14 12:10:48 +01:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Purpose

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.

Ubuntu

sudo add-apt-repository ppa:duggan/bats
sudo apt-get update
sudo apt-get install bats

Fedora

sudo dnf install bats

openSUSE

Bats is available for openSUSE Tumbleweed, as well as for openSUSE Leap 42.1 and later releases:

zypper install bats

For older releases, take a look at the development project on OBS (Open Build Service). You may find a repository containing a package for your target release, or build your own package using the sources found there.

Arch Linux

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

Mac OSX

Bats is available for Mac OSX using brew. If you dont have brew already, discover it and install it here.

brew install bats

Installation with bpkg

$ bpkg install -g sstephenson/bats