Mercurial > dotfiles
comparison .chezmoiscripts/run_once_after_39-install-helix.sh.tmpl @ 875:75fe7fda0948
feat: upstep helix with patch for indentation
author | Zeger Van de Vannet <zeger@vandevan.net> |
---|---|
date | Sun, 21 Apr 2024 18:47:59 +0200 |
parents | 6326025918fa |
children | 8284bef42d1b |
comparison
equal
deleted
inserted
replaced
866:1e11c38b195c | 875:75fe7fda0948 |
---|---|
1 {{ if (eq .chezmoi.os "linux") -}} | 1 {{ if (eq .chezmoi.os "linux") -}} |
2 #!/usr/bin/env bash | 2 #!/usr/bin/env bash |
3 | |
4 # Increment to trigger a new build | |
5 # Build version 24.03-3 | |
6 | 3 |
7 set -xe | 4 set -xe |
8 | 5 |
9 HELIX_BUILD_DIR=/tmp/helix | 6 HELIX_BUILD_DIR=/tmp/helix |
10 HELIX_INSTALL_DIR=$HOME/helix | 7 HELIX_INSTALL_DIR=$HOME/helix |
12 | 9 |
13 rm -rf $HELIX_BUILD_DIR | 10 rm -rf $HELIX_BUILD_DIR |
14 git clone https://github.com/zegervdv/helix $HELIX_BUILD_DIR | 11 git clone https://github.com/zegervdv/helix $HELIX_BUILD_DIR |
15 cd $HELIX_BUILD_DIR | 12 cd $HELIX_BUILD_DIR |
16 | 13 |
17 git checkout zegervdv | 14 git checkout 1db6d6fdc68566a1f075058c1e8fac8a533432d7 |
18 pushd vendor | 15 pushd vendor |
19 bash setup.sh | 16 bash setup.sh |
20 popd | 17 popd |
21 | 18 |
22 cargo build --release --locked | 19 cargo build --release --locked |
23 cp -r runtime $HELIX_DEFAULT_RUNTIME | 20 rm -rf $HELIX_DEFAULT_RUNTIME |
21 mkdir -p $HELIX_DEFAULT_RUNTIME | |
22 cp -r runtime/* $HELIX_DEFAULT_RUNTIME/ | |
24 cp target/release/hx $HELIX_INSTALL_DIR/hx | 23 cp target/release/hx $HELIX_INSTALL_DIR/hx |
25 | 24 |
26 ln -s $HELIX_INSTALL_DIR/hx $HOME/bin/hx | 25 dest=$HOME/bin/hx |
26 if [ -L $dest ] && [ -e $dest ]; then | |
27 echo 'Already linked!' | |
28 else | |
29 ln -s $HELIX_INSTALL_DIR/hx | |
30 fi | |
27 | 31 |
28 {{ end }} | 32 {{ end }} |