Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save QiangZiBro/cfbbb041ea15bee5225860eb23d79631 to your computer and use it in GitHub Desktop.
Save QiangZiBro/cfbbb041ea15bee5225860eb23d79631 to your computer and use it in GitHub Desktop.
One Liner to Download the Latest LazyGit Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jesseduffield/lazygit/releases/latest \
| grep "https://.*Linux_x86_64.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment