annotate .chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl @ 827:e4d67607d020

feat: install fzf and developer tools manually
author zegervdv <zegervdv@me.com>
date Wed, 03 Jan 2024 11:42:18 +0100
parents 2e86aa5360eb
children 3f2440bfd0de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
823
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
1 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}}
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
2 {{ $packages := dict
827
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
3 "fd" (dict "version" "9.0.0" "url" "https://github.com/sharkdp/fd/releases/download/v${VERSION}/fd-v${VERSION}-i686-unknown-linux-musl.tar.gz")
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
4 "rg" (dict "version" "14.0.3" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-x86_64-unknown-linux-musl.tar.gz")
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
5 "delta" (dict "version" "0.16.5" "url" "https://github.com/dandavison/delta/releases/download/${VERSION}/delta-${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}}
823
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
6 #!/usr/bin/env bash
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
7
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
8 set -xe
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
9
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
10 DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
11 INSTALL_DIR=$HOME/bin
827
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
12 export MANPAGE_DIR=$HOME/.local/man
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
13
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
14 mkdir -p $MANPAGE_DIR
823
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
15
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
16 mkdir -p $DOWNLOAD_DIR
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
17 pushd $DOWNLOAD_DIR
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
18
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
19 {{ range keys $packages }}
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
20 {{ $meta := get $packages . -}}
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
21 VERSION={{ get $meta "version" }}
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
22 echo "Downloading {{ . }} v{{ get $meta "version" }} ..."
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
23 curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz
827
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
24 install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }}
823
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
25 {{ end }}
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
26
827
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
27 find . -name "*.1" | xargs -I {} sh -c 'install {} "$MANPAGE_DIR/$(basename {})"'
e4d67607d020 feat: install fzf and developer tools manually
zegervdv <zegervdv@me.com>
parents: 823
diff changeset
28
823
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
29 popd
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
30 rm -rf $DOWNLOAD_DIR
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
31
2e86aa5360eb feat: install recent fd and ripgrep in home
zegervdv <zegervdv@me.com>
parents:
diff changeset
32 {{ end }}