Mercurial > dotfiles
comparison .chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl @ 823:2e86aa5360eb
feat: install recent fd and ripgrep in home
author | zegervdv <zegervdv@me.com> |
---|---|
date | Thu, 21 Dec 2023 10:43:19 +0100 |
parents | |
children | e4d67607d020 |
comparison
equal
deleted
inserted
replaced
822:0c2dcf35d759 | 823:2e86aa5360eb |
---|---|
1 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}} | |
2 {{ $packages := dict | |
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") | |
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") -}} | |
5 #!/usr/bin/env bash | |
6 | |
7 set -xe | |
8 | |
9 DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools | |
10 INSTALL_DIR=$HOME/bin | |
11 | |
12 mkdir -p $DOWNLOAD_DIR | |
13 pushd $DOWNLOAD_DIR | |
14 | |
15 {{ range keys $packages }} | |
16 {{ $meta := get $packages . -}} | |
17 VERSION={{ get $meta "version" }} | |
18 echo "Downloading {{ . }} v{{ get $meta "version" }} ..." | |
19 curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz | |
20 sudo install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }} | |
21 {{ end }} | |
22 | |
23 popd | |
24 rm -rf $DOWNLOAD_DIR | |
25 | |
26 {{ end }} |