Skip to content

Instantly share code, notes, and snippets.

View nullromo's full-sized avatar

Kyle Kovacs nullromo

  • United States
  • 21:30 (UTC -08:00)
View GitHub Profile
@nullromo
nullromo / update-lazygit.sh
Created June 3, 2024 16:28
Update lazygit
rm -f /tmp/lazygit.tar.gz
rm -f /tmp/lazygit
echo "Current version: $(lazygit --version)"
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
echo "New version: ${LAZYGIT_VERSION}"
curl -Lo /tmp/lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf /tmp/lazygit.tar.gz -C /tmp lazygit
sudo install /tmp/lazygit /usr/local/bin
echo "Updated. Version is now $(lazygit --version)"
rm /tmp/lazygit /tmp/lazygit.tar.gz