annotate .chezmoiscripts/run_once_after_39-install-helix.sh.tmpl @ 876:8589883596fd

fix: remove pathdirs option to avoid slow path completions see: https://stackoverflow.com/questions/76746392/why-is-my-zsh-tab-completion-slow-on-commands-but-not-directories > Perform a path search even on command names with slashes in them. > Thus if ?/usr/local/bin? is in the user?s path, and he or she types ?X11/xinit?, the command ?/usr/local/bin/X11/xinit? will be executed (assuming it exists). > Commands explicitly beginning with ?/?, ?./? or ?../? are not subject to the path search. This also applies to the ?.? and source builtins.
author Zeger Van de Vannet <zeger@vandevan.net>
date Thu, 25 Apr 2024 10:05:40 +0200
parents 75fe7fda0948
children 8284bef42d1b
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
875
75fe7fda0948 feat: upstep helix with patch for indentation
Zeger Van de Vannet <zeger@vandevan.net>
parents: 865
diff changeset
14 git checkout 1db6d6fdc68566a1f075058c1e8fac8a533432d7
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 }}