language: sh
env:
  matrix:
    - LINT=true
    - SHELL=bash
    - SHELL=dash
    - SHELL=ksh
    - SHELL=zsh
matrix:
  fast_finish: true
  allow_failures:
    - env: SHELL=zsh
script:
  - |
    if ${LINT:-false}; then
      shellcheck -s sh bin/shpec  # Just use th `sh` dialect
    else
      time $SHELL bin/shpec shpec/shpec_shpec.sh
    fi
cache: apt
before_install:
  - |
    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 
      done
    }
    if ${LINT:-false}; then
      pkg=$( get_shellcheck 0.3.5-3 0.3.4-3 )
      exec sudo dpkg -i $pkg
    fi
    if ! type $SHELL > /dev/null; then
        sudo apt-get update -qq &&
        sudo apt-get install -y $SHELL
    fi

language: sh
env:
  matrix:
    - LINT=true
    - SHELL=bash
    - SHELL=dash
    - SHELL=ksh
    - SHELL=zsh
matrix:
  fast_finish: true
  allow_failures:
    - env: SHELL=zsh
script:
  - |
    if ${LINT:-false}; then
      shellcheck -s sh bin/shpec  # Just use th `sh` dialect
    else
      time $SHELL bin/shpec shpec/shpec_shpec.sh
    fi
cache: apt
before_install:
  - |
    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
    }
    if ${LINT:-false}; then
      pkg=$( get_shellcheck 0.3.5-3 0.3.4-3 )
      exec sudo dpkg -i $pkg
    fi
    if ! type $SHELL > /dev/null; then
        sudo apt-get update -qq &&
        sudo apt-get install -y $SHELL
    fi

Insert 'break' after successful wget
Insert 'break' after successful wget
