forked from kzwkt/dotfiles-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_onchange_before_20-install-binaries.sh.tmpl
34 lines (26 loc) · 1.35 KB
/
run_onchange_before_20-install-binaries.sh.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.id "debian" "ubuntu") (ne .chezmoi.username "root")) -}}
#!/bin/bash
set -eufo pipefail
##--NodeJS--##
# renovate: depName=node datasource=node
current_nodejs_version=v17.1.0
if [ ! $(command -v node) ] || [ $(node -v) != "$current_nodejs_version" ]; then
curl -fsSL install-node.vercel.app | sudo bash -s -- --yes --version $current_nodejs_version
fi
##--FZF--##
# renovate: depName=junegunn/fzf datasource=github-releases
current_fzf_version=0.28.0
if [ ! $(command -v fzf) ] || [ $(fzf --version | head -n1 | cut -d" " -f1) != "$current_fzf_version" ]; then
curl -fL https://github.com/junegunn/fzf/releases/download/$current_fzf_version/fzf-$current_fzf_version-linux_{{ .chezmoi.arch }}.tar.gz | sudo tar -xzf - -oC /usr/local/bin/
sudo chmod +x /usr/local/bin/fzf
fi
{{ if .agekey -}}
##--age--##
# renovate: depName=FiloSottile/age datasource=github-tags
current_age_version=v1.0.0
if [ ! $(command -v age) ] || [ $(age --version) != "$current_age_version"] ]; then
curl -fL https://github.com/FiloSottile/age/releases/download/$current_age_version/age-$current_age_version-linux-{{ .chezmoi.arch }}.tar.gz | sudo tar -xzf - -oC /usr/local/bin/ --wildcards --no-anchored 'age/age*' --strip-components 1
find /usr/local/bin -name age* -exec sudo chmod +x {} +
fi
{{ end -}}
{{ end -}}