comparison .chezmoiscripts/run_onchange_after_17-install-mercurial.sh.tmpl @ 1092:6fb43864241b draft tip

feat: install mercurial using pipx
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 08 May 2025 21:56:41 +0200
parents f27c3aa3233c
children
comparison
equal deleted inserted replaced
1091:a1fab5298ef6 1092:6fb43864241b
1 {{ $version := "7.0.2" -}}
1 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}} 2 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}}
2 {{ $version := "6.9.2" -}} 3 #!/usr/bin/env -S ${HOME}/bin/mise exec [email protected] [email protected] -- bash
4 {{ else }}
3 #!/usr/bin/env bash 5 #!/usr/bin/env bash
6 {{ end }}
4 7
5 set -xe 8 set -xe
6 9
7 sudo apt install --yes clang rustc cargo python3-dev python3-setuptools python3-docutils python3-pip 10 {{ if (and (eq .chezmoi.os "linux") (eq .chezmoi.osRelease.name "Ubuntu")) -}}
11 sudo apt install --yes clang rustc cargo python3-dev
12 {{ end }}
8 13
9 curl -fsSL https://foss.heptapod.net/mercurial/mercurial-devel/-/archive/{{ $version }}/mercurial-devel-{{ $version }}.tar.gz | tar xz -C /tmp 14 pipx install "mercurial=={{ $version }}" --pip-args '--no-cache-dir --config-settings --global-option=--rust --no-binary=mercurial'
10 cd /tmp/mercurial-devel-{{ $version }} 15 pipx inject mercurial hg-evolve~=11.1.8 hg-git~=1.1.2 mercurial_keyring~=1.4.4
11
12 mkdir -p $HOME/mercurial
13
14 $HOME/bin/mise exec [email protected] -- pip install docutils
15 $HOME/bin/mise exec [email protected] [email protected] -- make PURE=--rust install-home
16 $HOME/bin/mise exec [email protected] [email protected] -- pip install --upgrade hg-evolve~=11.1.3 hg-git~=1.1.2 mercurial_keyring~=1.4.4
17
18
19 {{ end }}