Simple, lightweight, self-documented task runner for POSIX Shell. Compatible with ash, bash, dash, Linux, Mac OS, alpine, docker.
You could create shell script e.g. run in your project with code:
task_hello() { ## Print Hello World box
_box --p=1 --bg-green --bold --white "Hello World! $(_ansi --blue "🌍")"
}
url="https://raw.githubusercontent.com/webuni/shell-task-runner/master/run"if [ -n"$(command -v 'wget')" ];theneval"$(wget -qO- "$url")";elseeval"$(curl -s "$url")";fiAnd then you just have to run this file sh ./run.
_align
_ansi
_box
_doc_comment
_doc_title
_docker_run
_dotenv
_header: Application header.
_indent
_log
_quote
_printf_escape
_shell_escape
_tasks: List of functions with prefix
task_.
_fail
_pass
If you want to replace a helper functions, you should import runner script and then implement helper function.
At the end of the file, you must explicitly call _run:
url="https://raw.githubusercontent.com/webuni/shell-task-runner/master/run"if [ -n"$(command -v 'wget')" ];theneval"$(wget -qO- "$url")";elseeval"$(curl -s "$url")";fi_header()(
printf'%s\n\n'"$(_ansi --bold "My application")"
)
_run "$@"