Mercurial > dotfiles
comparison .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 |
comparison
equal
deleted
inserted
replaced
826:b2e6175efcad | 827:e4d67607d020 |
---|---|
1 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}} | 1 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}} |
2 {{ $packages := dict | 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") | 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") -}} | 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 "delta" (dict "version" "0.16.5" "url" "https://github.com/dandavison/delta/releases/download/${VERSION}/delta-${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}} | |
5 #!/usr/bin/env bash | 6 #!/usr/bin/env bash |
6 | 7 |
7 set -xe | 8 set -xe |
8 | 9 |
9 DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools | 10 DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools |
10 INSTALL_DIR=$HOME/bin | 11 INSTALL_DIR=$HOME/bin |
12 export MANPAGE_DIR=$HOME/.local/man | |
13 | |
14 mkdir -p $MANPAGE_DIR | |
11 | 15 |
12 mkdir -p $DOWNLOAD_DIR | 16 mkdir -p $DOWNLOAD_DIR |
13 pushd $DOWNLOAD_DIR | 17 pushd $DOWNLOAD_DIR |
14 | 18 |
15 {{ range keys $packages }} | 19 {{ range keys $packages }} |
16 {{ $meta := get $packages . -}} | 20 {{ $meta := get $packages . -}} |
17 VERSION={{ get $meta "version" }} | 21 VERSION={{ get $meta "version" }} |
18 echo "Downloading {{ . }} v{{ get $meta "version" }} ..." | 22 echo "Downloading {{ . }} v{{ get $meta "version" }} ..." |
19 curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz | 23 curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz |
20 sudo install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }} | 24 install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }} |
21 {{ end }} | 25 {{ end }} |
26 | |
27 find . -name "*.1" | xargs -I {} sh -c 'install {} "$MANPAGE_DIR/$(basename {})"' | |
22 | 28 |
23 popd | 29 popd |
24 rm -rf $DOWNLOAD_DIR | 30 rm -rf $DOWNLOAD_DIR |
25 | 31 |
26 {{ end }} | 32 {{ end }} |