Crates.io | invoke-script |
lib.rs | invoke-script |
version | 0.7.0 |
source | src |
created_at | 2023-06-22 04:19:36.435435 |
updated_at | 2023-06-25 02:02:22.985041 |
description | Finally, a task runner for the rest of us |
homepage | |
repository | https://gitlab.com/wake-sleeper/invoke-script |
max_upload_size | |
id | 896886 |
size | 24,490 |
./scripts
folderinvoke-script
is ✨ syntactic sugar ✨ around executing programs in your
scripts
folder.
Tip: Alias
invoke-script
to something short likeis
This is currently only available as a cargo binary. Installation options will be expanded once/if this gets to v1.0.0.
cargo install invoke-script
I you have a file starting with a hash-bang line in a ./scripts
folder:
scripts/build.sh
#! /usr/bin/sh
echo compiling stuff...
sleep 2
echo done
You run it using:
invoke-script build
>> compiling stuff...
>> done
It does not need to be bash. Any interpreter-like program can be used if you
can specify the full path to it. On linux machines, you can use the
/usr/bin/env
if you are not sure what the full path might be.
scripts/test.py
#! /usr/bin/env python
print("HELLO FROM PYTHON")
Run it the same way:
invoke-script test
>> HELLO FROM PYTHON