Mercurial > dotfiles
diff .chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl @ 1093:9732db099471 draft
feat: enable dotfiles on aarch64/Fedora
author | "Zeger Van de Vannet <zeger@vandevan.net>" |
---|---|
date | Sun, 18 May 2025 16:28:58 +0200 |
parents | 6ab26ddbf78d |
children |
line wrap: on
line diff
--- a/.chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl Thu May 08 21:56:41 2025 +0200 +++ b/.chezmoiscripts/run_onchange_after_22-install-devtools.sh.tmpl Sun May 18 16:28:58 2025 +0200 @@ -1,10 +1,9 @@ -{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu" )) -}} +{{ if (and (eq .chezmoi.os "linux") (or (eq .chezmoi.osRelease.name "Ubuntu" ) (eq .chezmoi.osRelease.name "Fedora Linux Asahi Remix" ))) -}} +#!/usr/bin/env bash {{ $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") - "delta" (dict "version" "0.16.5" "url" "https://github.com/dandavison/delta/releases/download/${VERSION}/delta-${VERSION}-x86_64-unknown-linux-musl.tar.gz") - "hyperfine" (dict "version" "1.18.0" "url" "https://github.com/sharkdp/hyperfine/releases/download/v${VERSION}/hyperfine-v${VERSION}-x86_64-unknown-linux-musl.tar.gz") -}} -#!/usr/bin/env bash + "fd" (dict "version" "10.2.0" "url" "https://github.com/sharkdp/fd/releases/download/v${VERSION}/fd-v${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "i686") ) + "rg" (dict "version" "14.1.1" "url" "https://github.com/BurntSushi/ripgrep/releases/download/${VERSION}/ripgrep-${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "x86_64") ) + "hyperfine" (dict "version" "1.19.0" "url" "https://github.com/sharkdp/hyperfine/releases/download/v${VERSION}/hyperfine-v${VERSION}-${PKG_ARCH}-unknown-linux-${PKG_LIBC}.tar.gz" "arch" ((eq .chezmoi.arch "arm64") | ternary "aarch64" "x86_64") ) -}} set -xe @@ -17,9 +16,15 @@ mkdir -p $DOWNLOAD_DIR pushd $DOWNLOAD_DIR +{{ if (eq .chezmoi.arch "arm64") -}} +PKG_LIBC="gnu" +{{ else -}} +PKG_LIBC="musl" +{{ end }} {{ range keys $packages | sortAlpha }} {{ $meta := get $packages . -}} VERSION={{ get $meta "version" }} +PKG_ARCH={{ get $meta "arch" }} echo "Downloading {{ . }} v{{ get $meta "version" }} ..." curl -fsSL {{ get $meta "url" }} | tar --strip-components=1 -xz install -m 755 $DOWNLOAD_DIR/{{ . }} $INSTALL_DIR/{{ . }}