Open cxjava opened 1 year ago
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
Thank you for the response! Maybe this requirement is not so urgent.
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.
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
Such as https://github.com/xtaci/kcptun, in this
kcptun-linux-amd64-20231012.tar.gz
releaseContains 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/
.