Skip to content

Instantly share code, notes, and snippets.

@bolasblack
Created October 5, 2018 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bolasblack/2ae2841d5d92276c83f57e49017ac19e to your computer and use it in GitHub Desktop.
Save bolasblack/2ae2841d5d92276c83f57e49017ac19e to your computer and use it in GitHub Desktop.
# 1
curl -o yarn -L `curl -s 'https://api.github.com/repos/yarnpkg/yarn/releases/latest' | jq -r '.assets | map(select(.name | test("legacy.*js$")) | .browser_download_url) | .[0] | tostring'` && chmod u+x yarn
# 2
VERSION=$(curl https://yarnpkg.com/latest-version)
curl -L -o yarn https://github.com/yarnpkg/yarn/releases/download/v$VERSION/yarn-legacy-$VERSION.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment