1+ > [ !CAUTION]
2+ > This is work in progress, use on your own risk.
3+
14# run.sh
25
36A Makefile replacement written in pure bash. No DSL, no runtime dependencies,
@@ -6,7 +9,7 @@ no build step — just scripts.
69## Install
710
811``` sh
9- curl -fsSL https://raw.githubusercontent.com/imgproxy/run-sh/main/install.sh | bash -e
12+ curl -fsSL https://raw.githubusercontent.com/imgproxy/run-sh/refs/heads/ main/install.sh | bash -s -- -e
1013```
1114
1215This sets up, in the current project:
@@ -22,15 +25,13 @@ folder for task files.
2225
2326``` sh
2427./run # list available tasks
25- ./run help < task> # show a task's usage
2628./run < task> [args...]
27- ./run new < task> # scaffold a new task file
2829```
2930
3031## Optional: global command
3132
3233``` sh
33- curl -fsSL https://raw.githubusercontent.com/imgproxy/run-sh/main/install.sh | bash -s -- -g
34+ curl -fsSL https://raw.githubusercontent.com/imgproxy/run-sh/refs/heads/ main/install.sh | bash -s -- -e -g
3435```
3536
3637Installs ` run ` to ` ~/.local/bin ` , which walks up from your current directory
@@ -58,8 +59,44 @@ main() {
5859}
5960```
6061
61- Scaffold one with ` ./run new <name> ` , or see ` examples/ ` for zero-arg,
62- positional-arg, flag-parsing, and task-composition patterns.
62+ See ` examples/ ` for zero-arg, positional-arg, flag-parsing, and
63+ task-composition patterns.
64+
65+ ## Dependencies
66+
67+ Compose tasks with ` depends_on ` inside a task's ` main() ` :
68+
69+ ``` sh
70+ main () {
71+ depends_on build test
72+ echo " deploying..."
73+ }
74+ ```
75+
76+ ` depends_on ` runs each named task in order and stops at the first failure.
77+
78+ ## External libraries
79+
80+ run.sh itself has no runtime dependencies, but your tasks can use any tool you
81+ already have installed. Install libraries the same way you normally would
82+ (Homebrew, apt, npm, pip, etc.) and call them from your task files.
83+
84+ For reusable helpers, source them from ` .runrc ` :
85+
86+ ``` sh
87+ # .runrc
88+ . " $TASK_ROOT /vendor/some-lib.sh"
89+ ```
90+
91+ Use the built-in ` require_tool ` helper to fail early with a friendly message
92+ when a required command is missing:
93+
94+ ``` sh
95+ main () {
96+ require_tool jq " jq is required (https://jqlang.github.io/jq/)"
97+ jq ' .version' package.json
98+ }
99+ ```
63100
64101## Philosophy
65102
0 commit comments