Created
June 3, 2024 16:28
-
-
Save nullromo/bb9d555d8239381eda7edb4057449910 to your computer and use it in GitHub Desktop.
Update lazygit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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