Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: setup-util support for streamlined {bin,man,lib,etc} extraction #223

Open
edmcman opened this issue Apr 25, 2024 · 4 comments
Open
Labels
enhancement Improvement or suggestion

Comments

@edmcman
Copy link

edmcman commented Apr 25, 2024

I'm creating a command to setup Ghidra. Ghidra is distributed as a zip file that is extracted somewhere and then run with a script. You need all the files, unfortunately. It's similar to gradle's binary distribution if you've used that.

Is setup-util compatible with such a package? It seems like most of the DOWNLOAD options assume the utility is going to be a single file.

@balupton
Copy link
Member

Sure, setup-util-bash unzips and builds. Others unzip multiple files, and others unzip a single file. If you have vscode you can run dorothy edit then file search for DOWNLOAD_ARCHIVE_GLOB

@balupton
Copy link
Member

If it has github assets, you can use this structure instead:
https://github.com/bevry/dorothy/blob/master/commands/setup-util-sd

@edmcman
Copy link
Author

edmcman commented Apr 25, 2024

Thanks, I played with these a bit. If I understand correctly, sd downloads a zip and extracts a single file. bash downloads a zip, extracts a bunch of files and builds, but only installs a single file. Ghidra needs to have multiple files installed. The ghidraRun file/script is used to start it, but that's just a small script.

Here's what I'm using now: https://github.com/edmcman/dotfiles/blob/main/commands/setup-util-ghidra

Basically the support files have to live somewhere. I don't see a way to accomplish this now with setup-util. Maybe it's rare enough that it's not needed.

@balupton
Copy link
Member

balupton commented Apr 25, 2024

From memory there are existing utilities that would benefit from having other files extracted as well, but yeah, the download technique in setup-util doesn't currently natively support that. The complexity is that I'm not sure XDG supports such extractions, so they would have to go to /usr/local or whatever, which sometimes requires sudo.

If we get a few more utilities needing such, will make sense to do a PR.

Marking as a suggestion.

@balupton balupton changed the title Question: setup-util for archive distributions Suggestion: setup-util support for streamlined {bin,man,lib,etc} extraction Apr 25, 2024
@balupton balupton added the enhancement Improvement or suggestion label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or suggestion
Development

No branches or pull requests

2 participants