SHA256
1
0
forked from pool/helix

- update post install MESSAGE

- update helix.sh script:
    * The HELIX_RUNTIME env var is causing some issues
    * current workaround is to check if $USER is root. otherwise, create a runtime directory → $HOME/.config/helix/runtime then run helix without the HELIX_RUNTIME env var.

OBS-URL: https://build.opensuse.org/package/show/editors/helix?expand=0&rev=2
This commit is contained in:
Soc Virnyl Estela 2022-04-21 04:14:45 +00:00 committed by Git OBS Bridge
parent 1e82f51de1
commit 8144732fde
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
#!/bin/sh
HELIX_RUNTIME=/usr/lib64/helix/runtime exec /usr/lib64/helix/hx "$@"
if [ "$USER" == "root" ]
then
HELIX_RUNTIME=/usr/lib64/helix/runtime exec /usr/lib64/helix/hx "$@"
else
mkdir -p "$HOME/.config/helix/runtime"
exec /usr/lib64/helix/hx "$@"
fi

View File

@ -59,11 +59,11 @@ install -Dm755 %{SOURCE3} %{buildroot}%{_bindir}/%{name}
%post -p /bin/bash
MESSAGE="The launcher binary is renamed as 'helix', alias hx='helix' if you were using 'hx'.
Helix also needs its runtime files so make sure to copy/symlink the runtime/ directory into the config directory (for example ~/.config/helix/runtime).
Runtime directory is found in '/usr/lib64/helix/runtime'.
Then run 'helix --grammar fetch' then 'helix --grammar build' to install the grammars.
To customize language-specific settings, you can copy '/usr/share/doc/packages/helix/languages.toml'
to '~/.helix/' or '~/.config/helix'. More information can be found in https://docs.helix-editor.com/languages.html"
Helix also needs its runtime files so make sure to copy/symlink the runtime/ directory into the config directory (for example ~/.config/helix/runtime).
If you see an error when launching helix, copy the runtime directory. Runtime directory is found in '/usr/lib64/helix/runtime'.
Then run 'helix --grammar fetch' then 'helix --grammar build' to install the grammars.
To customize language-specific settings, you can copy '/usr/share/doc/packages/helix/languages.toml'
to '~/.helix/' or '~/.config/helix'. More information can be found in https://docs.helix-editor.com/languages.html"
echo -e "${MESSAGE}"
%files