News for hackers. Stuff that matters.
Re:Bunster: Compile bash scripts to self contained executables by wiether on Thursday January 23, 2025 @12:02PM (#42805713)
First of all, thank you for your work!

I'm using it daily for many years now and it does exactly what I expect it to do.

Now I'm a little concerned by the end of your message because it could make its usage a bit trickier...

My main usecase is to curl the raw discord.sh file from GitHub in a Dockerfile and put in in /user/local/bin, so then I can _discord.sh_ anytime I need it. Mostly used for CI images.

The only constraint is to install jq if it's not already installed on the base image.

Switching to Go or C would make the setup much harder I'm afraid

Re:Bunster: Compile bash scripts to self contained executables by Imustaskforhelp on Thursday January 23, 2025 @12:10PM (#42805785)
From what it seems , it seems that its possible to run this thing without installing go,rust,c itself

to quote from the page

With scriptisto you can build your binary in an automatically managed Docker container, without having compilers installed on host. If you build your binary statically, you will be able to run it on host. There are a lot if images that help you building static binaries, starting from alpine offering a MUSL toolchain, to more specialized images.

Find some docker-* templates via scriptisto new command.

Examples: C, Rust. No need to have anything but Docker installed!

Builds in Docker enabled by populating the docker_build config entry, defined as such:

Also I am watching the video again because I had viewed it a looong time ago !

Re:Bunster: Compile bash scripts to self contained executables by Imustaskforhelp on Thursday January 23, 2025 @12:08PM (#42805775)
I suppose https://www.youtube.com/watch?v=eRHlFkomZJg

If you don't want to watch video , then I can link the tool it uses https://github.com/igor-petruk/scriptisto/wiki/Writing-scrip...

Re:Bunster: Compile bash scripts to self contained executables by benediktwerner on Thursday January 23, 2025 @12:23PM (#42805915)
Why would that make the setup harder? If they provide a statically-linked executable, you can just download and run it, without even the need to install jq or anything else. It's not like they'd provide Go code and ask you to compile it yourself. Go isn't Python.
Re:Bunster: Compile bash scripts to self contained executables by xenophonf on Thursday January 23, 2025 @12:58PM (#42806257)
Even Python isn't Python.

https://pyinstaller.org/

Works great. I use this instead of pipx.

Re:Bunster: Compile bash scripts to self contained executables by fieu on Thursday January 23, 2025 @12:32PM (#42805991)
Thank you for using the project!

On the concern of it would be harder to setup, I think it would be easier in fact, you would simply curl the Go or C statically generated binary to your path and would alleviate the need for jq or curl to be installed alongside.

I think the reason I haven’t made the switch yet is I like Bash (even though my script is getting pretty big), and in a way it’s a testament to what’s possible in the language. Projects like https://github.com/acmesh-official/acme.sh really show the power of Bash.

That and I think the project would need a name change, and discord.sh as a name gets the point across better than anything I can think of.

Re:Bunster: Compile bash scripts to self contained executables by wiether on Friday January 24, 2025 @04:47AM (#42811770)
Sorry I misunderstood your message!

In that case yes, if it allows you to keep the project going, that's great!