Skip to content

Instantly share code, notes, and snippets.

@nullromo
Created June 3, 2024 16:28
Show Gist options
  • Save nullromo/bb9d555d8239381eda7edb4057449910 to your computer and use it in GitHub Desktop.
Save nullromo/bb9d555d8239381eda7edb4057449910 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment