4 ms·
I have exactly the same issue. I maintain a project called discord.sh which sends Discord webhooks via pure Bash (and a little bit of jq and curl). At some poin
by fieu 2y ago
I have exactly the same issue. I maintain a project called discord.sh which sends Discord webhooks via pure Bash (and a little bit of jq and curl). At some point I might switch over to Go or C.
https://github.com/fieu/discord.sh https://github.com/fieu/discord.sh
- wiether 2y agoFirst 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
- Imustaskforhelp 2y agoI suppose https://www.youtube.com/watch?v=eRHlFkomZJg 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-scripts#builds-in-docker https://github.com/igor-petruk/scriptisto/wiki/Writing-scrip...
- Imustaskforhelp 2y agoFrom 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 !
- benediktwerner 2y agoWhy 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.
- xenophonf 2y agoEven Python isn't Python. https://pyinstaller.org/ https://pyinstaller.org/ Works great. I use this instead of pipx.
- fieu 2y agoThank 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 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.
- wiether 2y agoSorry I misunderstood your message! In that case yes, if it allows you to keep the project going, that's great!