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 |