Jan Christian Grünhage
||4 years ago|
|src||4 years ago|
|.gitignore||4 years ago|
|Cargo.lock||4 years ago|
|Cargo.toml||4 years ago|
|LICENSE||4 years ago|
|README.md||4 years ago|
|config.example.toml||4 years ago|
A little tool to write scripts to folders for usage with run-parts, based on definitions in a toml file. Written mostly for educational purposes, it would probably be easier to write the scripts themselves, than to take care of a config file where they are defined.
Assuming you have a config file
config.toml in the directory you are currently in,
generating the scripts from it is as easy as running
If something doesn't work, you should see output complaining.
If something went wrong but you see no output, try adding
-v to the command,
and again if that didn't help (but not more than four
This will enable more verbose logging.
There is an example config file in this repository, called config.example.toml, you can orient yourself on that.
The most basic valid config file only contains the line
reduce_to_config = true
To then add actual functionality, add a folder block:
[[folders]] path = ''
And to that folder block add a script block for each script you want to add to that folder:
[[folders.scripts]] name = '' commands = ['']
You can add as many folder blocks as you want, and to those folder blocks as many script blocks as you want. This should be enough to get you going, gl hf!
You're going to need ..
- ~/.cargo/bin/ in your $PATH
- Internet access
I'll assume the third thing is already present, to get the first two, head over to rustup.
Clone the source code to rpg-rs
git clone https://git.jcg.re/jcgruenhage/run-parts-gen-rs.git rpg-rs
Enter the just cloned source directory
Compile a release build
You should now have the binary in