|
@@ -1,20 +1,23 @@
|
|
|
#!/usr/bin/env bash
|
|
#!/usr/bin/env bash
|
|
|
set -e
|
|
set -e
|
|
|
-DIR="$HOME/.local/src/helix"
|
|
|
|
|
-rm -rf "$DIR"
|
|
|
|
|
-git clone --depth=1 https://github.com/helix-editor/helix "$DIR"
|
|
|
|
|
|
|
|
|
|
-pushd "$DIR"
|
|
|
|
|
|
|
+PKG="https://github.com/helix-editor/helix/releases/download/25.07.1/helix-25.07.1-x86_64-linux.tar.xz"
|
|
|
|
|
+TARBALL=$(basename "$PKG")
|
|
|
|
|
+EXPATH=$(basename "$PKG" .tar.xz)
|
|
|
|
|
|
|
|
-# gitcommit grammar build hangs during install, so remove its grammar block
|
|
|
|
|
-awk '/^\[\[grammar\]\]$/{b=$0; next} b{if(/^$/){if(b!~/gitcommit/)print b"\n"$0; b=""}else{b=b"\n"$0; next}} END{if(b&&b!~/gitcommit/)print b}' languages.toml > l.tmp && mv l.tmp languages.toml
|
|
|
|
|
|
|
+echo "PKG : $PKG"
|
|
|
|
|
+echo "TARBALL: $TARBALL"
|
|
|
|
|
+echo "EXPATH : $EXPATH"
|
|
|
|
|
|
|
|
-cargo install --path helix-term --locked
|
|
|
|
|
|
|
+curl -LO "$PKG"
|
|
|
|
|
+tar -xJf "$TARBALL"
|
|
|
|
|
|
|
|
-popd
|
|
|
|
|
-
|
|
|
|
|
-# Symlink runtime (grammars, themes) so helix finds them at runtime
|
|
|
|
|
-mkdir -p "$HOME/.config/helix"
|
|
|
|
|
-ln -sfn "$DIR/runtime" "$HOME/.config/helix/runtime"
|
|
|
|
|
|
|
+mkdir -p "$HOME"/.config/helix
|
|
|
|
|
+mkdir -p "$HOME"/.local/bin
|
|
|
|
|
|
|
|
|
|
+mv "$EXPATH"/hx "$HOME"/.local/bin
|
|
|
|
|
+rm -rf "$HOME"/.config/helix/runtime
|
|
|
|
|
+mv "$EXPATH"/runtime "$HOME"/.config/helix/
|
|
|
|
|
|
|
|
|
|
+rm -r "$TARBALL"
|
|
|
|
|
+rm -rf "$EXPATH"
|