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

feat: support multiple binaries from one link #40

Open
cxjava opened this issue Nov 7, 2023 · 5 comments
Open

feat: support multiple binaries from one link #40

cxjava opened this issue Nov 7, 2023 · 5 comments

Comments

@cxjava
Copy link

cxjava commented Nov 7, 2023

Such as https://github.com/xtaci/kcptun, in this kcptun-linux-amd64-20231012.tar.gz release

Contains two binaries: server_darwin_amd64, client_darwin_amd64,

What I expected is : when I run this repository script, I can install those two binaries into the folder /usr/local/bin/.

@jpillora
Copy link
Owner

jpillora commented Nov 7, 2023

Ah interesting use case, doable, though it breaks a few assumptions. Like the as param, e.g. install ripgrep as rg - two/more binaries wouldn't work here. important here, because with your example, you might want them to be called kcptun-server and kcptun-client - that might be too hard to automatically do though...

Currently the logic treats the largest file (over 1MB) in the archive as the binary

If there's 2, and the tar has 100 files, how do you find the binaries? largest 2? all files over 1MB? do you use the file mode, anything thats marked executable? some people do chmod 777 everything

@cxjava
Copy link
Author

cxjava commented Nov 7, 2023

Thank you for the response! Maybe this requirement is not so urgent.

@onedr0p
Copy link

onedr0p commented Jan 23, 2024

I also have a use-case for this with https://github.com/siderolabs/talos/releases/tag/v1.6.2. I would like to only grab the talosctl artifact from these releases. Right now it only pulls talos which is not what I want.

Maybe there can be a filter arg like ?filter=talosctl&as=tctl that wrap a glob around it ?

Edit: this is not the same as what OP mentioned. I will open a new issue.

@cxjava
Copy link
Author

cxjava commented Oct 25, 2024

I've implemented a Cloudflare Worker version that meets my requirements.

If you're interested, feel free to give it a try.

https://github.com/cxjava/installer

# mp means multi program
# mp fuzzy matching: client_linux_amd64, you can just input client
curl https://your-workers-domain.workers.dev/xtaci/kcptun!?mp=client,server | bash
mv /usr/local/bin/client /usr/local/bin/kcptun_client
mv /usr/local/bin/server /usr/local/bin/kcptun_server
/usr/local/bin/kcptun_client -v
/usr/local/bin/kcptun_server -v

@divyam234
Copy link

https://github.com/divyam234/installer try my fork added support for windows ,fixed private repos installation ,multiple binaries install and filtering releases by search term and better arch detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants