<commit_before>language: sh
cache: apt
env:
  - LINT=true
  - SHELL=bash
  - SHELL=dash
  - SHELL=ksh
  - SHELL=zsh
matrix:
  include:
    - os: osx
      env: SHELL=bash
  exclude:
    - os: osx
  fast_finish: true
os:
  - linux
  - osx
script:
  - |
    $SHELL --version

    if [ "$SHELL" = "zsh" ]; then
      cat > $HOME/.zshenv <<END
        disable -r end
        setopt sh_word_split
    END

    fi
    if ${LINT:-false}; then
      shellcheck -s sh bin/shpec  # 'sh' refers to POSIX
    else
      $SHELL bin/shpec
    fi
before_install:
  - |
    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      get_shellcheck() {
        (
        for v
        do
          pkg=shellcheck_${v}_amd64.deb
          url="http://ftp.debian.org/debian/pool/main/s/shellcheck/"
          wget $url/$pkg || continue
          echo $pkg
          break
        done
        )
      }
      install_shell(){
        echo "Install $SHELL"
        sudo apt-get update -qq
        sudo apt-get install -y $SHELL
      }

      if ${LINT:-false}; then
        pkg=$( get_shellcheck 0.3.5-3 0.3.4-3 )
        sudo dpkg -i $pkg<commit_msg>Refactor Travis configuration<commit_after>language: sh
cache: apt
env:
  - LINT=true
  - SHELL=bash
  - SHELL=dash
  - SHELL=ksh
  - SHELL=zsh
matrix:
  fast_finish: true
  include:
    - env:
        - SHELL=bash
      os: osx
script:
  - |
    if [ -n "${LINT}" ]; then
      shellcheck -s sh bin/shpec  # 'sh' refers to POSIX
    else
      $SHELL bin/shpec
    fi
before_install:
  - |
    install_shellcheck() {
      (
      for v; do
        pkg=shellcheck_${v}_amd64.deb
        url="http://ftp.debian.org/debian/pool/main/s/shellcheck/"
        wget $url/$pkg || continue
        echo "Installing $pkg"
        sudo dpkg -i $pkg
        break
      done
      )
    }
    install_shell() {
      echo "Installing $SHELL"
      sudo apt-get update -qq
      sudo apt-get install -y $SHELL
    }

    if [ "${SHELL}" = "zsh" ]; then
      echo "disable -r end; setopt sh_word_split" >> $HOME/.zshenv
    fi

    if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
      if [ -n "${LINT}" ]; then
        install_shellcheck 0.3.5-3 0.3.4-3
{'fraction_non_alphanumeric': 0.12922649374710515, 'fraction_numerical': 0.009263547938860583, 'mean_word_length': 1.7, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1813412', 'n_tokens_mistral': 842, 'n_tokens_neox': 797, 'n_words': 189}