diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..896808e --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# shake - a simple shell-based command runner + +`shake` is a simpler `just`. + +Commands are stored in a file called `shakefile` using POSIX shell syntax: + +```sh +HOST=$(uname -a) + +shake_doc build +build() { + shake_echo_command cc *.c -o main +} + +shake_doc test +test() { + build + shake_echo_command ./test --all + echo "Yay, all your tests passed!" +} + +shake_doc b +alias b=build +``` + +``` +$ shake -l +build +test +b +$ shake test +cc *.c -o main +./test --all +Yay, all your tests passed! +``` + +`shake` has many of `just`'s features, but not all. The following are not +supported: + - Windows, without installing something like Git Bash + - Recipes cannot accept command-line arguments + - `shake` does not have a custom syntax. It uses POSIX shell. + - It cannot support arbitrary languages. Just POSIX shell. + +## Installation + +Copy the `shake` file from this repo into your `~/.local/bin` + +## Quick Start + +Once `shake` is installed, create a file named `shakefile` in the root of your +project with the following contents: + +```sh +default() { + echo "This is a recipe" +} + +another-recipe() { + echo "This is another recipe" +} +``` + +By default, running `shake` with no arguments runs the `default` recipe. One or +more arguments specify the recipe(s) to run: + +``` +$ shake +This is a recipe +$ shake another-recipe +This is another recipe +``` + +## Contributing + +`shake` is considered feature complete, but if you have a cool idea, feel free +to create an issue for it. If you do submit a patch, note that `shake` is +released under the [CC0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt) +public license and thus your changes must also be under this license. |
