Open Entze opened 1 month ago
This is something I've thought about a little bit, but not in great detail. I think maybe the best option is just to have a way to extract either just one file (the executable) or to just dump all the contents of the archive under one directory.
That might be a good approach in case a project provides multiple binaries as well.
It might be beneficial to gather usecases/projects where such a setting would be useful. I will look through the tools I use and gather usecases if you don't mind.
It might be beneficial to gather usecases/projects where such a setting would be useful. I will look through the tools I use and gather usecases if you don't mind.
Yes, please. I'd be interested in knowing more about these use cases.
A review of the apps/tools I use, showed ubi in relation to the following situations:
Importantly, to reiterate, I'm not asking for the scope to be expanded to cover all those cases.
I'd also love to have that functionality. Right now, I rely on hardcoded wget
, tar
, and ln
commands in my dotfiles to download GitHub releases, extract their contents, and link binaries, completions, and man pages to the appropriate locations. It would be great if ubi
could handle finding the correct links and extraction steps. I’d still manually link completions and man pages to the right places since that process often varies across packages and may be challenging to automate fully in ubi
.
For reference: install-binaries.conf.yaml
Example:
# download musl release, extract to ~/.local/share/packages
cd ~/.local/share/packages
wget "https://github.com/chmln/sd/releases/download/v1.0.0/sd-v1.0.0-x86_64-unknown-linux-musl.tar.gz" -O - | tar -xz;
# link binary, fish completion, man page
ln -s ~/.local/share/packages/sd-v1.0.0-x86_64-unknown-linux-musl/sd ~/.local/bin/sd
ln -s ~/.local/share/packages/sd-v1.0.0-x86_64-unknown-linux-musl/completions/sd.fish ~/.local/share/fish/vendor_completions.d/sd.fish
ln -s ~/.local/share/packages/sd-v1.0.0-x86_64-unknown-linux-musl/sd.1 ~/.local/share/man/man1/sd.1
When installing the Helix-Editor with ubi, the binary is downloaded correctly, however the runtime directory, containing tree-sitter definitions, themes and the tutor are missing.
As a user I would like to specify a path (maybe multiple) of resources that are extracted along side the single binary, such that static configuration files are not missing.
Let me know if you need any more insights or help.