Skip to content

Instantly share code, notes, and snippets.

@jettero
Last active June 17, 2021 16:57
Show Gist options
  • Save jettero/d8f1773f1870b4c0a0231f0f88629e9c to your computer and use it in GitHub Desktop.
Save jettero/d8f1773f1870b4c0a0231f0f88629e9c to your computer and use it in GitHub Desktop.
every time I think to use 'gh', it needs an update... automate
#!/bin/bash
set -e
curl -s https://api.github.com/repos/cli/cli/releases/latest \
| grep "browser_download_url.*amd64.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O ~/Downloads/gh-latest-linux-amd64.deb --progress=bar:force -T15 -t100 -i -
set -x
sudo dpkg -i ~/Downloads/gh-latest-linux-amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment