Skip to content

Instantly share code, notes, and snippets.

@fourside
Created January 14, 2022 15:14
Show Gist options
  • Save fourside/ef69da72c47779591ee9ab23af096ea4 to your computer and use it in GitHub Desktop.
Save fourside/ef69da72c47779591ee9ab23af096ea4 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -ex
cd ~/work
GH_URL=`gh release view -R cli/cli --json assets -q .assets[].url | grep linux_amd64.tar.gz`
curl -LO $GH_URL
GH_FILE=`basename ${GH_URL}`
tar xzf $GH_FILE
GH_DIR=${GH_FILE%.tar.gz}
ln -fs ~/work/${GH_DIR}/bin/gh ~/bin/gh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment