Crates.io | lush |
lib.rs | lush |
version | 0.1.8 |
source | src |
created_at | 2024-07-02 04:21:15.248052 |
updated_at | 2024-10-18 05:46:06.72162 |
description | LuSH is a lua for shell scripts - embedded in a single binary, easy to share, to run everywhere |
homepage | https://gitlab.com/thiagomg/lush |
repository | https://gitlab.com/thiagomg/lush |
max_upload_size | |
id | 1289230 |
size | 73,357 |
LuSH is a lua for shell scripts - embedded in a single binary, easy to share, to run everywhere
I love Bash. I have tons of bash scripts, they're run only on my machine. If I copy to other hosts, they never work properly because either the bash version is older or some of the shell utils are not available or are not the same version, etc. Surely there are many methods to solve this, but the scripts complexity just increase. In prative, they never work everywhere.
I want to simplify my life, not the other way around.
My own solution for that is to be able to deploy, just by copying, all I need to run my scripts. My first idea was to build a portable bash version, but I still need to have many other utils, such as awk, cut, wc, etc. So, why not using a more powerful language? For that, one widely used, easy and that just works is LUA. I love its simplicity and powerful tables.
Initially, where I am, this will be a portable LUA interpreter (without any dependencies, all static) and many lua scripts with helpers to make it easy for the scripts to call local binaries.
Why not Python?
Because I really don't like whitespace as block delimiter
Why not Ruby?
Because the runtime is big and not very portable.
Why not (whatever other language)?
Because I had to choose one. I got a super popular language as I don't want to be the eternal father of the project. I want something to solve my issues and not creating more. LUA has tons of scripts to do pretty much anything and most of them I just need to copy a lua file to a directory. Isn't it great?
Run the script
cargo install lush
Please refer to the doc directory of this repository. Each module has its own file