<commit_before># Cadfaelbrew

Cadfaelbrew is a fork of [Homebrew](http://brew.sh), the Mac OS package manager, for the SuperNEMO-DBD experiment.

It can be installed in your home directory and does not require root access. The same package manager can be used on both your Linux server and your Mac laptop. Installing a modern version of *glibc* and *gcc* in your home directory on an old distribution of Linux takes five minutes.

Features, usage and installation instructions are summarised below.

Cadfaelbrew follows upstream linuxbrew with some lag depending on production requirements.
Merges typically happen on 2-3 month cycles. To receive updates of major changes to Linuxbrew subscribe 
to the [Linuxbrew Updates](https://github.com/Linuxbrew/linuxbrew/issues/864) issue on GitHub.

If you require an update that's in linuxbrew and not yet merged into Cadfaelbrew, please raise an issue.

Features
--------
+ Can install software to a home directory and so does not require sudo
+ Install software not packaged by the native distribution
+ Install up-to-date versions of software when the native distribution is old
+ Use the same package manager to manage both your Mac and Linux machines


Install Cadfaelbrew (tl;dr)
--------------------------
```sh
$ git clone https://github.com/SuperNEMO-DBD/cadfaelbrew.git ~/CadfaelBrew
```

Add to your `.bashrc` or `.zshrc`:

```sh
export PATH="$HOME/CadfaelBrew/bin:$PATH"
export MANPATH="$HOME/CadfaelBrew/share/man:$MANPATH"
export INFOPATH="$HOME/CadfaelBrew/share/info:$INFOPATH"
```

```sh
$ brew cadfael-bootstrap
$ brew install falaise
```

You're done! Unless you saw errors, in which case review [Dependencies](#dependencies) and [Installation](#installation)
below for more details. The second command installs the main SuperNEMO software package, Falaise, which is provided in
a [dedicated `tap` for SuperNEMO](https://github.com/SuperNEMO-DBD/homebrew-cadfael).

Dependencies
------------
+ **Mac OS X**
  + **OS X** 10.9 or newer 
  + **Xcode** 6 or newer 
+ **Linux**:
  * **Ruby** 1.8.6 or newer
  + **GCC** 4.2 or newer
  * **Git** 1.7.12.4 or newer
  + **Linux** 2.6.16 or newer
  + **64-bit x86** or **32-bit ARM** platform

A dedicated brew command `cadfael-bootstrap` is provided to check system dependencies and will 
check everything for you and report any missing items with some instructions on how to install them.
The actual packages required and checked for on Linux systems are listed below including the command(s)
needed to install them.

### Ubuntu

```sh
sudo apt-get install \
  build-essential \
  curl \
  git \
  python-setuptools \
  ruby2.0 \<commit_msg>Link to troubleshooting in TLDR install<commit_after># Cadfaelbrew

Cadfaelbrew is a fork of [Homebrew](http://brew.sh), the Mac OS package manager, for the SuperNEMO-DBD experiment.

It can be installed in your home directory and does not require root access. The same package manager can be used on both your Linux server and your Mac laptop. Installing a modern version of *glibc* and *gcc* in your home directory on an old distribution of Linux takes five minutes.

Features, usage and installation instructions are summarised below.

Cadfaelbrew follows upstream linuxbrew with some lag depending on production requirements.
Merges typically happen on 2-3 month cycles. To receive updates of major changes to Linuxbrew subscribe 
to the [Linuxbrew Updates](https://github.com/Linuxbrew/linuxbrew/issues/864) issue on GitHub.

If you require an update that's in linuxbrew and not yet merged into Cadfaelbrew, please raise an issue.

Features
--------
+ Can install software to a home directory and so does not require sudo
+ Install software not packaged by the native distribution
+ Install up-to-date versions of software when the native distribution is old
+ Use the same package manager to manage both your Mac and Linux machines


Install Cadfaelbrew (tl;dr)
--------------------------
```sh
$ git clone https://github.com/SuperNEMO-DBD/cadfaelbrew.git ~/CadfaelBrew
```

Add to your `.bashrc` or `.zshrc`:

```sh
export PATH="$HOME/CadfaelBrew/bin:$PATH"
export MANPATH="$HOME/CadfaelBrew/share/man:$MANPATH"
export INFOPATH="$HOME/CadfaelBrew/share/info:$INFOPATH"
```

```sh
$ brew cadfael-bootstrap
$ brew install falaise
```
The second command installs the main SuperNEMO software package, Falaise, which is provided in
a [dedicated `tap` for SuperNEMO](https://github.com/SuperNEMO-DBD/homebrew-cadfael). 

You're done! Unless you saw errors, in which case review [Dependencies](#dependencies) and [Installation](#installation)
below for more details. If these do not solve the issue, please read the [Troubleshooting Checklist](https://github.com/SuperNEMO-DBD/cadfaelbrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting) and submit an Issue following the instructions there if required.

Dependencies
------------
+ **Mac OS X**
  + **OS X** 10.9 or newer 
  + **Xcode** 6 or newer 
+ **Linux**:
  * **Ruby** 1.8.6 or newer
  + **GCC** 4.2 or newer
  * **Git** 1.7.12.4 or newer
  + **Linux** 2.6.16 or newer
  + **64-bit x86** or **32-bit ARM** platform

A dedicated brew command `cadfael-bootstrap` is provided to check system dependencies and will 
check everything for you and report any missing items with some instructions on how to install them.
The actual packages required and checked for on Linux systems are listed below including the command(s)
needed to install them.

### Ubuntu

```sh
sudo apt-get install \
  build-essential \
  curl \
  git \
  python-setuptools \
  ruby2.0 \
{'fraction_non_alphanumeric': 0.1038751345532831, 'fraction_numerical': 0.011123071402942232, 'mean_word_length': 4.091324200913242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2668062', 'n_tokens_mistral': 1726, 'n_tokens_neox': 1597, 'n_words': 693}