Skip to content

Commit 2fce4ad

Browse files
committed
Lazygit setup added
1 parent db0da8b commit 2fce4ad

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

scripts/setup/lazygit.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
install_lazygit() {
4+
if ! command -v lazygit &>/dev/null; then
5+
echo installing Lazygit...
6+
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
7+
curl -Lo lazygit.tar.gz --output-dir /tmp "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
8+
tar -xf /tmp/lazygit.tar.gz -C /tmp lazygit
9+
mkdir -p $HOME/.local/bin
10+
install /tmp/lazygit $HOME/.local/bin
11+
rm /tmp/lazygit*
12+
echo Lazygit installed
13+
else
14+
echo Lazygit already installed
15+
fi
16+
}
17+
18+
install_lazygit

0 commit comments

Comments
 (0)