Kristian Glass - Do I Smell Burning?

Mostly technical things

ShellCheck on CircleCI

Are you using ShellCheck on your shell scripts? If not, you probably want to.

Are you using CircleCI to run your tests etc.? Then you may have already noticed that you can’t just apt-get install shellcheck.

Instead, you’ll probably want something like the following in your circle.yml:

dependencies:
  override:
    - "sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe'"
    - "sudo apt-get update"
    - "sudo apt-get install shellcheck"

Why?

ShellCheck is packaged for Ubuntu, however it only made it in as of the Wily release. At time of writing (September 2016) CircleCI offers Precise and Trusty, neither of which have the shellcheck package.

This meant people were building it from source (installing a Haskell build environment in order to do so) and fiddling with CircleCI config to try to cache this - there’s a nice example in the git-town repo.

Fortunately it’s in trusty-backports so you can add the backports source (yay for apt-add-repository so there’s no need for scripted direct hackery of source.list) and apt-get install it like any other package!

Comments