Skip to content

Instantly share code, notes, and snippets.

@fscm
Last active January 25, 2022 18:25
Show Gist options
  • Save fscm/acfda152af5bdc55ae087c80efe7d48e to your computer and use it in GitHub Desktop.
Save fscm/acfda152af5bdc55ae087c80efe7d48e to your computer and use it in GitHub Desktop.
[macOS] Install shellcheck

[macOS] Install shellcheck

Instructions on how to install the shellcheck command-line tool.

Install

shellcheck can be obtained here. Copy the link for the version that you want to install from there (or just use lastest one).

Get the shellcheck archive and extract it with the following command:

curl -fsSL --retry 3 --insecure "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.darwin.x86_64.tar.xz" | sudo tar xz --no-same-owner --strip-components=1 -C /usr/local/bin/ shellcheck*/shellcheck

Since the previous command install the stable version of the tool, the same command can also be used to update the tool.

Verify

Run the following command on a terminal window:

shellcheck --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment