diff .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
line wrap: on
line diff
--- a/.chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl	Fri Dec 22 10:27:32 2023 +0100
+++ b/.chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl	Wed Jan 03 11:42:18 2024 +0100
@@ -1,13 +1,17 @@
 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}}
 {{ $packages := dict
-				 "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")
-				 "rg" (dict "version" "14.0.3" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}}
+				 "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")
+				 "rg"    (dict "version" "14.0.3" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-x86_64-unknown-linux-musl.tar.gz")
+				 "delta" (dict "version" "0.16.5" "url" "https://github.com/dandavison/delta/releases/download/${VERSION}/delta-${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}}
 #!/usr/bin/env bash
 
 set -xe
 
 DOWNLOAD_DIR=${TMPDIR:-/tmp}/devtools
 INSTALL_DIR=$HOME/bin
+export MANPAGE_DIR=$HOME/.local/man
+
+mkdir -p $MANPAGE_DIR
 
 mkdir -p $DOWNLOAD_DIR
 pushd $DOWNLOAD_DIR
@@ -17,9 +21,11 @@
 VERSION={{ get $meta "version" }}
 echo "Downloading {{ . }} v{{ get $meta "version" }} ..."
 curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz
-sudo install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }}
+install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }}
 {{ end }}
 
+find . -name "*.1" | xargs -I {} sh -c 'install {} "$MANPAGE_DIR/$(basename {})"'
+
 popd
 rm -rf $DOWNLOAD_DIR