Skip to content

Instantly share code, notes, and snippets.

View QiangZiBro's full-sized avatar
😎
Focusing

qiangzibro QiangZiBro

😎
Focusing
  • Iluvatar CoreX
  • China
View GitHub Profile
  • 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 \" \