Closed sandreas closed 3 months ago
Hey @sandreas! I'm very happy you like dra
:smile:
I just published a new release 0.5.4 which fixes some of these problems:
tbz
is now supportedUnfortunately, you will still have issues installing btop, jq and pandoc.
If you try the command now, it will work, but it will extract install.sh
instead of the actual btop
executable.
This is because dra
find the first executable in the root directory (with max depth 2). In this case, btop
is located at btop-x86_64-linux-musl/btop/bin/btop
.
Same issue for pandoc
.
This is not supported yet, need some development.
Both of these issues are in my backlog, I just need some time to work on it (not sure when though).
As a workaround you could do something like this:
dra download -a -o btop.tbz aristocratos/btop
tar xjf btop.tbz
mv btop/bin/btop "$HOME/bin"
I will keep this issue open, and update you when these issues will be fixed!
I just realized that you can install jq
without issues. You don't have to use --install
since there's nothing to install.
You just need to download, make executable and move somewhere in $PATH
:
dra download -a -o "$HOME/bin/jq" jqlang/jq
chmod +x "$HOME/bin/jq"
I actually do this for various tool in my dotfiles:
This got my thinking that I should add some examples in the README.md with some of these cases
I just published a new release 0.5.4 which fixes some of these problems:
Awesome, thank you!
This is because dra find the first executable in the root directory (with max depth 2).
Maybe it would be cool to have a flag --install-prefer-binary
to skip scripts etc.
I just realized that you can install jq without issues. You don't have to use --install since there's nothing to install. You just need to download, make executable
I'd still prefer using --install
to exactly perform this action, because I use a script to walk to a series of projects and if it could all of them the same this would save me a ton of work.
I also would love to have a --from-file
parameter, where you can provide a list like this, where comments and empty lines are ignored and a CSV toolname can be prefixed, to tell how the tool is named if the repository is not equal.
# bat - modern cat replacement
sharkdp/bat
# btop - process explorer
aristocratos/btop
# difftastic - better diff
difft;Wilfred/difftastic
# eza - modern ls replacement
eza-community/eza
# fd - find replacement
sharkdp/fd
# fzf - fuzzy finder
junegunn/fzf
# gdu - disk usage analyzer similar to ncdu but faster
dundee/gdu
# jless - json viewer
PaulJuliusMartinez/jless
# jq - json query tool
jqlang/jq
# lazydocker - terminal docker management ui
jesseduffield/lazydocker
# mdtopdf - markdown to pdf converter
# mandolyte/mdtopdf
# pandoc - document conversion tool
jgm/pandoc
# pandoc dependency
typst/typst
# rg - ripgrep, better grep tool
rg;BurntSushi/ripgrep
# rga - ripgrep-all, grep for PDF
rga;phiresky/ripgrep-all
# starship - powerlevel10k replacement
starship/starship
# tone - audio tagger
sandreas/tone
# yazi - terminal file manager
sxyazi/yazi
# zellij - terminal multiplexer
zellij-org/zellij
# zoxide - modern cd replacement
ajeetdsouza/zoxide
Maybe it would be cool to extend this to toml
with some extras:
[rga]
id = "phiresky/ripgrep-all"
name = "rga"
description = "ripgrep-all, grep for PDF"
type = "binary" # script, appimage, whatever
path = "/rga"
Thank you for taking the time :-)
Yet another problem with restic/restic
containing a .bz2
file (https://github.com/restic/restic/releases/download/v0.16.5/restic_0.16.5_linux_amd64.bz2)
No problem, I'll add .bz2
as well.
I'm working on the issues regarding btop/pandoc and similar archives
No problem, I'll add .bz2 as well.
restic.bz2
contains one single file restic-latest
and it is NOT executable - that may be the problem.
Could the following workflow would be more robust?:
jq
- ELF) and not an archive
--install
to destinationbtop
) firstMaybe a (future) enum parameter --install-rules=NamedBinary,Binary,ArchiveNamedBinary,ArchiveBinary,ArchiveExecutable
could be used in the future to control the order of lookup rules.
Thanks for putting work in.
Thank you for your interest in improving dra
. I'll think about your proposal :smile:
I have a working version in the branch install-v2 if you want to try it (See CONTRIBUTING.md)
I changed the rules on how dra
choose the executable file:
--install
)In case there are too many executables, you can select which one to install by passing the name to --install <name>
option.
It's still very work in progress, things may change in the next days
Otherwise, you get an error for no executable or too many executables.
This won't work for restic
, because the bz2
does neither contain any executable nor a file named restic
. I think the ELF lookup is the only way to overcome this... or maybe submitting an issue to the restic team...
I have an idea to fix this. I was thinking it was a tar archive compressed with bz2 but it's just a file compressed with bz2.
I can treat this files differently than archives:
This needs some work, but it should be quite easy.
I have an idea to fix this.
Sounds reasonable... not as robust, but if it is easier to implement, go for it :-) Thanks.
Hi @sandreas!
I just pre-released 0.5.5-beta which you can download and try out.
In the CHANGELOG/Release notes, you should be able to find the needed information on how to use the new features.
It's a pre-release because I don't have time to finish everything, but in the meantime I can collect your feedback :smile:
Let me know if it works fine or you encounter some issues!
Let me know if it works fine or you encounter some issues!
I will test this tomorrow. Thanks.
So here is my report for 0.5.5-beta:
aristocratos/btop
jqlang/jq
restic/restic
phiresky/ripgrep-all
# Error: Many executable candidates found, you must select onejgm/pandoc
So everything worked but ripgrep-all
and jq
(which I think is intented because of providing just a binary)...
Thanks for fixing the most of it so quick.
For phiresky/ripgrep-all
you can do dra download -a -I rga phiresky/ripgrep-all
.
The new option -I
allows to select which executable to install when many are available and it can't automatically choose one.
I forgot to include this part in the error message, but I will do before the release.
For jq
there's still work to do.
For
phiresky/ripgrep-all
you can dodra download -a -I rga phiresky/ripgrep-all
.The new option
-I
allows to select which executable to install when many are available and it can't automatically choose one.I forgot to include this part in the error message, but I will do before the release.
For
jq
there's still work to do.
Can it handle cases like yazi, that has 2 binaries?
You have to handle it manually. I can see there are two executables:
If you need both, you can do:
dra download -a -i sxyazi/yazi
# this will install the default executable yazi
dra download -a -I ya sxyazi/yazi
# this will install executable you choose to install
You have to handle it manually. I can see there are two executables:
- yazi
- ya
If you need both, you can do:
dra download -a -i sxyazi/yazi # this will install the default executable yazi dra download -a -I ya sxyazi/yazi # this will install executable you choose to install
You mean I shuld do 2 commands, right? this was my question, if the -I allowed for a ["ya", "yazi"]
or something along those lines.
Yes two commands. I could make -I accept multiple values...I'll think about it
Hi everyone!
Quick update: in the next few days I will do a new release with all the improvements discussed in this issue.
You'll also be able to install binaries like jq.
I need to write documentation, but most work is already done.
New release 0.6.0 is out!
If you have any problems, don't hesitate to create a new issue :smile:
Hey,
thanks for creating this, great tool. I use
dra
to install my monolithic tools into$HOME/bin/
. To do so, I maintain a list of tools in a txt files that are installed automatically.Reducing my installer script by using
dra
worked pretty well with the following exceptions:Maybe you could take a look? Thank you.