Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 1.41 KB

api.md

File metadata and controls

77 lines (45 loc) · 1.41 KB

Bake

Bake: A Bash-based Make alternative

Overview

Bake is a dead-simple task runner used to quickly cobble together shell scripts

In a few words, Bake lets you call the following 'print' task with './bake print'

#!/usr/bin/env bash
task.print() {
printf '%s\n' 'Contrived example'
}

Learn more about it on GitHub

Index

bake.die

Prints $1 formatted as an error and the stacktrace to standard error, then exits with code 1

Arguments

  • $1 (string): Text to print

bake.warn

Prints $1 formatted as a warning to standard error

Arguments

  • $1 (string): Text to print

bake.info

Prints $1 formatted as information to standard output

Arguments

  • $1 (string): Text to print

bake.assert_not_empty

Dies if any of the supplied variables are empty

Arguments

  • ... (string): Names of variables to check for emptiness

bake.assert_cmd

Dies if a command cannot be found

Arguments

  • $1 (string): Command name to test for existence

bake.has_flag

Determine if a flag was passed as an argument

Arguments

  • $1 (string): Flag name to test for
  • ... (string): Rest of the arguments to search through