-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_once_020_install_git_extras.sh.tmpl
43 lines (36 loc) · 1.46 KB
/
run_once_020_install_git_extras.sh.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash -e
{{ if eq .chezmoi.os "darwin" -}}
# installing git-extras
script_dir="$(pwd)"
cd ~/.vendor/git-extras
sudo make install
cd $script_dir
# installing git-quick-stats
cd ~/.vendor/git-quick-stats
sudo make install
cd $script_dir
{{ else if (and (eq .chezmoi.os "linux") (not .codespaces)) -}}
echo "installing git extras for osRelease: {{ .chezmoi.osRelease.id }}"
{{ if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "ubuntu")) -}}
# installing git extras from package manager
sudo apt-get install -y --no-install-recommends git-extras git-quick-stats
{{ else if eq .chezmoi.osRelease.id "arch" -}}
# install git-extras from aur
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/git-extras.tar.gz
tar -xvf git-extras.tar.gz && cd git-extras && makepkg
sudo pacman -U --noconfirm git-extras*.pkg.tar.zst && cd ..
rm -rf git-extras*
# install git-extras from aur
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/git-quick-stats.tar.gz
tar -xvf git-quick-stats.tar.gz && cd git-quick-stats && makepkg
sudo pacman -U --noconfirm git-quick-stats*.pkg.tar.zst && cd ..
rm -rf git-quick-stats*
{{ else if eq .chezmoi.osRelease.id "fedora" -}}
sudo dnf install -y git-extras
git clone https://github.com/arzzen/git-quick-stats.git && cd git-quick-stats
sudo make install
cd .. && rm -rf git-quick-stats*
{{ else if eq .chezmoi.osRelease.id "alpine" -}}
sudo apk add --update git-extras@testing git-quick-stats@testing
{{ end -}}
{{ end -}}