annotate .chezmoiscripts/run_once_after_39-install-helix.sh.tmpl @ 1058:9a26b3369ef0

feat: add extra changes to helix build
author Zeger Van de Vannet <zeger@vandevan.net>
date Wed, 28 Aug 2024 20:02:57 +0200
parents 9f9d247727fe
children 7d9ba468d4d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
1058
9a26b3369ef0 feat: add extra changes to helix build
Zeger Van de Vannet <zeger@vandevan.net>
parents: 1056
diff changeset
14 git checkout 4fd6c35a9cc186a4feff6274233ee5f9442759c2
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
1036
31351132efca feat: switch rtx to mise and fixes for clean installs
Zeger Van de Vannet <zeger@vandevan.net>
parents: 882
diff changeset
19 {{ if (eq .chezmoi.osRelease.name "Ubuntu") }} $HOME/bin/mise x [email protected] -- {{ end }} 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
1036
31351132efca feat: switch rtx to mise and fixes for clean installs
Zeger Van de Vannet <zeger@vandevan.net>
parents: 882
diff changeset
29 ln -s $HELIX_INSTALL_DIR/hx $dest
875
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 }}