77 lines
1.9 KiB
Groff
77 lines
1.9 KiB
Groff
.TH BAKE "1" "April 2024" "bake 20240413" "User Commands"
|
|
.SH NAME
|
|
.B bake
|
|
\- file embeddable scripts
|
|
.SH SYNOPSIS
|
|
.B bake
|
|
[option] target\-file [\fBarguments\fP ...]
|
|
.SH DESCRIPTION
|
|
Use the format \fB@BAKE\fP cmd ... within the target\-file, this will execute the
|
|
rest of line, or until the first \fB@STOP\fR marker.
|
|
|
|
This format may be embedded within \fBbinary files\fP, or any file where no unwanted preceding
|
|
instance of
|
|
.B @BAKE
|
|
appears.
|
|
|
|
\fBShake\fP does not support some features of \fBBake\fP, such as \fB@STOP\fP or \fBbinary files\fP,
|
|
please avoid its use.
|
|
|
|
Options must always be put first, and may be merged together.
|
|
|
|
.HP
|
|
\-v \-\-version, \-h \-\-help, \fB\-n \-\-dry\-run\fP, \fB\-x \-\-expunge\fP,
|
|
\fB\-c \-\-color\fP
|
|
.PP
|
|
Expansions
|
|
|
|
These symbols will expand to their counterpart before execution.
|
|
.TP
|
|
.B @FILENAME, $@
|
|
returns target\-file (abc.x.txt)
|
|
.TP
|
|
.B @SHORT, $*
|
|
returns target\-file without suffix (abc.x.txt \-> abc.x)
|
|
.TP
|
|
.B @ARGS, $+
|
|
returns
|
|
.B arguments
|
|
|
|
.PP
|
|
Additional Features And Notes
|
|
|
|
Shell execution may be disabled with the
|
|
.B -n or --dry-run
|
|
option.
|
|
|
|
\fB@{\fPEXPUNGE_THIS_FILE\fB}\fP is a inline block to delete files or
|
|
directories, non-recursive, only one file per block, removed from left to right.
|
|
Has no influence on the normal command execution. The deletion only occurs if
|
|
you use the
|
|
.B -x or --expunge
|
|
option.
|
|
|
|
Colors may be disabled with the
|
|
.B -c or --color
|
|
option.
|
|
|
|
\\SPECIAL_NAME will result in SPECIAL_NAME in the executed shell
|
|
command. Backslashes are applicable to all symbols used by Bake, they are
|
|
ignored otherwise.
|
|
|
|
.SH EXAMPLE
|
|
.\" SRC BEGIN (example.c)
|
|
.EX
|
|
// example.c
|
|
// @BAKE cc -o @{@SHORT} @FILENAME @ARGS
|
|
// or, simply, @BAKE cc -o @{$*} $@ $+
|
|
#include <stdio.h>
|
|
int main (void) {
|
|
puts("Hello.");
|
|
return 0;
|
|
}
|
|
.EE
|
|
.SH COPYRIGHT
|
|
.PP
|
|
Licensed under the GNU Public License version 3 only, see <https://www.gnu.org/licenses/gpl\-3.0\-standalone.html>.
|