Ever burned a cake?
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chad C. Starz 481638424b
balanced
1 week ago
LICENSE init 7 months ago
README balanced 1 week ago
TODO no select 1 month ago
bake.1 bump v20240413 1 week ago
bake.c bump v20240413 1 week ago
config.h (mostly) appease C89 2 weeks ago
dist.sh distrib 1 month ago
install.sh distrib 1 month ago
shake bump v20240408 2 weeks ago

README

--- Bake ---

Bake scripts into files.

Executes @BAKE to the end of the line or until @STOP within in any given file.

You may have multi-line commands, by either including a leading @STOP or by
ending each line with a backslash.

The execution takes place at the root of the target file, so if you have:
`test/file.c', and then execution takes place at `test' and the file is simply
regarded as `file.c'.

you may see a real example in the primary and only source file: `bake.c'. this
is not targeted toward any language and should be fairly flexible, especially
when multi-line comments are available. You should always consider your usecase
before using a tool like this. Bake is not an all-in-one solution, nor is it
designed to be a sophisticated build system, consider something like GNU Make or
Meson instead.

Binary files (files that contain characters < ' ' or > '~') are supported.

Manpages are included: bake(1) shake(1)

--- Building ---

Bootstrapping may be done with Shake, simply run `./shake ./bake.c'

Or simply run `install.sh', you'll need to be a privileged user to install the
files. See the file's content for more details regarding the installation.

--- Macro Extension ---

Macro provides various descriptive factors about the current context:

@FILENAME : Filename of the baked file (abc.x.txt)
@SHORT : Shortened version of the Filename (^-> abc.x)
@ARGS : the remaining arguments to Bake

$@, $*, $+, are respectively mapped to @FILENAME, @SHORT, and @ARGS. They have
been partially deprecated, however they'll never be removed, use them if you'd
like.

They are most useful for a general template command, such as:

@BAKE cc @FILENAME -o @{@SHORT} @ARGS

Backslash, while otherwise ignored, will be respected at the end of the line to
concatenate lines together or if added to before any of listed macros will yield
the unfettered text. \SPECIAL_NAME will result in SPECIAL_NAME in the executed
shell command. Backslashes are applicable to all symbols used by Bake.

--- Expunge Extension ---

Removes any singular file or directory non recursively defined within @{...},
this has no effect on the normal processing of the statement and is macro'd out
before it is executed.

This is useful in such cases that you create a temporary file or output file
that may be later recreated or may need to be manually updated. It is most
useful for simple scrubbing of outputs. You could have a directory of toy
programs and wish to clean them all up, and using a command like:

for i in `ls *.c`; do bake -x $i; done

This is of course can also be done with another UNIX command like the following,
assuming the other files outside of the regexp are not important:

ls | egrep -v '.+\.[ch]' | xargs rm

This feature was suggested by the original author of Shake, blame him for this.

--- Options ---

Options must come before the filename, and may be merged together, such as -cxn.

-v, --version: Display versioning and licensing information.
-h, --help: Display the help message, similarly to empty input.
-n, --dry-run: DRYRUN: does NOT run anything!
-x, --expunge: See above Expunge Extension section.
-c, --color: Disables color for a clean output.

--- Shake ---

Bake was inspired by the Bash-based Shake utility (formerly eMake, he liked my
suggestion for a name). It is included under authorization of its creator. The
original version of Shake may be found at:
<http://bis64wqhh3louusbd45iyj76kmn4rzw5ysawyan5bkxwyzihj67c5lid.onion/anon/shake>

Bake includes a modified Shake, both after installation and as a bootstrapper.
The modified version includes all features of Bake with the exceptions of
multi-line commands. It is not a general replacement for Bake.

Bake is licensed under the GPLv3-only, See LICENSE.

Bake was created on September 13th, 2023, and is complete as of 2024/03/02.