Mercurial > dotfiles
annotate .chezmoiscripts/run_once_after_39-install-helix.sh.tmpl @ 882:8284bef42d1b
feat: update helix with hg fix
Allows to open files from the vcs picker from any directory (not only hg root)
author | Zeger Van de Vannet <zeger@vandevan.net> |
---|---|
date | Fri, 26 Apr 2024 07:59:02 +0200 |
parents | 75fe7fda0948 |
children | 59bf256e6c1c |
rev | line source |
---|---|
865
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
1 {{ if (eq .chezmoi.os "linux") -}} |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
2 #!/usr/bin/env bash |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
3 |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
4 set -xe |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
5 |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
6 HELIX_BUILD_DIR=/tmp/helix |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
7 HELIX_INSTALL_DIR=$HOME/helix |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
8 HELIX_DEFAULT_RUNTIME=$HELIX_INSTALL_DIR/runtime |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
9 |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
10 rm -rf $HELIX_BUILD_DIR |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
11 git clone https://github.com/zegervdv/helix $HELIX_BUILD_DIR |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
12 cd $HELIX_BUILD_DIR |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
13 |
882
8284bef42d1b
feat: update helix with hg fix
Zeger Van de Vannet <zeger@vandevan.net>
parents:
875
diff
changeset
|
14 git checkout c98fc6aa3cf06a1873d4b999e1fc57ec9050d40f |
865
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
15 pushd vendor |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
16 bash setup.sh |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
17 popd |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
18 |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
19 cargo build --release --locked |
875
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
20 rm -rf $HELIX_DEFAULT_RUNTIME |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
21 mkdir -p $HELIX_DEFAULT_RUNTIME |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
22 cp -r runtime/* $HELIX_DEFAULT_RUNTIME/ |
865
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
23 cp target/release/hx $HELIX_INSTALL_DIR/hx |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
24 |
875
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
25 dest=$HOME/bin/hx |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
26 if [ -L $dest ] && [ -e $dest ]; then |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
27 echo 'Already linked!' |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
28 else |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
29 ln -s $HELIX_INSTALL_DIR/hx |
75fe7fda0948
feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents:
865
diff
changeset
|
30 fi |
865
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
31 |
6326025918fa
feat: install custom helix build with mercurial support
Zeger Van de Vannet <zeger@vandevan.net>
parents:
diff
changeset
|
32 {{ end }} |