view .chezmoiscripts/run_once_after_39-install-helix.sh.tmpl @ 865:6326025918fa

feat: install custom helix build with mercurial support
author Zeger Van de Vannet <zeger@vandevan.net>
date Fri, 05 Apr 2024 18:47:56 +0200
parents
children 7af4c092f6c2 3e2b701ca7f1
line wrap: on
line source

{{ if (eq .chezmoi.os "linux") -}}
#!/usr/bin/env bash

# Increment to trigger a new build
# Build version 24.03-3

set -xe

HELIX_BUILD_DIR=/tmp/helix
HELIX_INSTALL_DIR=$HOME/helix
HELIX_DEFAULT_RUNTIME=$HELIX_INSTALL_DIR/runtime

rm -rf $HELIX_BUILD_DIR
git clone https://github.com/zegervdv/helix $HELIX_BUILD_DIR
cd $HELIX_BUILD_DIR

git checkout zegervdv
pushd vendor
bash setup.sh
popd

cargo build --release --locked
cp -r runtime $HELIX_DEFAULT_RUNTIME
cp target/release/hx $HELIX_INSTALL_DIR/hx

ln -s $HELIX_INSTALL_DIR/hx $HOME/bin/hx

{{ end }}