From a27ed0a8209dd6d3869fb7a935926fabbc767376 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 4 Mar 2025 12:01:27 +0100 Subject: [PATCH] Improve gitconfig and install script --- install.lazygit.sh | 8 ++++++++ install.sh | 8 ++++++++ zsh/.gitconfig | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100755 install.lazygit.sh diff --git a/install.lazygit.sh b/install.lazygit.sh new file mode 100755 index 0000000..428e130 --- /dev/null +++ b/install.lazygit.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*') +curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" + +tar xf lazygit.tar.gz lazygit +sudo install lazygit -D -t /usr/local/bin/ +rm lazygit lazygit.tar.gz diff --git a/install.sh b/install.sh index 68dc350..654d391 100755 --- a/install.sh +++ b/install.sh @@ -11,3 +11,11 @@ git clone https://github.com/agkozak/zsh-z ~/.oh-my-zsh/custom/plugins/zsh-z ./solve-stow.sh zsh chsh -s $(which zsh) + +echo "Do you wish to install lazygit?" +select yn in "Yes" "No"; do + case $yn in + Yes ) ./install.lazygit.sh; break;; + No ) exit;; + esac +done diff --git a/zsh/.gitconfig b/zsh/.gitconfig index ba0fd57..8769b44 100644 --- a/zsh/.gitconfig +++ b/zsh/.gitconfig @@ -1,9 +1,10 @@ [user] - email = tim.veenendaal@gmail.com name = Tim [core] - excludesfile = /home/tim/.gitignore + excludesfile = ~/.gitignore [push] default = current [init] defaultBranch = master +[include] + path = ~/.gitconfig.local