2024-04-14 01:22:07 -04:00
|
|
|
.TH BAKE "1" "April 2024" "bake 20240413" "User Commands"
|
2024-02-26 23:19:55 -05:00
|
|
|
.SH NAME
|
|
|
|
.B bake
|
|
|
|
\- file embeddable scripts
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B bake
|
|
|
|
[option] target\-file [\fBarguments\fP ...]
|
|
|
|
.SH DESCRIPTION
|
2024-03-24 16:33:57 -04:00
|
|
|
Use the format \fB@BAKE\fP cmd ... within the target\-file, this will execute the
|
2024-02-26 23:19:55 -05:00
|
|
|
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.
|
|
|
|
|
2024-04-14 01:17:32 -04:00
|
|
|
Options must always be put first, and may be merged together.
|
2024-02-26 23:19:55 -05:00
|
|
|
|
|
|
|
.HP
|
2024-04-14 01:17:32 -04:00
|
|
|
\-v \-\-version, \-h \-\-help, \fB\-n \-\-dry\-run\fP, \fB\-x \-\-expunge\fP,
|
|
|
|
\fB\-c \-\-color\fP
|
2024-02-26 23:19:55 -05:00
|
|
|
.PP
|
|
|
|
Expansions
|
|
|
|
|
2024-04-14 01:17:32 -04:00
|
|
|
These symbols will expand to their counterpart before execution.
|
2024-02-26 23:19:55 -05:00
|
|
|
.TP
|
2024-04-07 01:29:33 -04:00
|
|
|
.B @FILENAME, $@
|
2024-04-14 01:17:32 -04:00
|
|
|
returns target\-file (abc.x.txt)
|
2024-02-26 23:19:55 -05:00
|
|
|
.TP
|
2024-04-07 01:29:33 -04:00
|
|
|
.B @SHORT, $*
|
2024-02-26 23:19:55 -05:00
|
|
|
returns target\-file without suffix (abc.x.txt \-> abc.x)
|
|
|
|
.TP
|
2024-04-07 01:29:33 -04:00
|
|
|
.B @ARGS, $+
|
2024-02-26 23:19:55 -05:00
|
|
|
returns
|
|
|
|
.B arguments
|
2024-04-06 19:59:15 -04:00
|
|
|
|
|
|
|
.PP
|
|
|
|
Additional Features And Notes
|
|
|
|
|
2024-04-14 01:17:32 -04:00
|
|
|
Shell execution may be disabled with the
|
|
|
|
.B -n or --dry-run
|
|
|
|
option.
|
2024-04-06 19:59:15 -04:00
|
|
|
|
2024-04-14 01:17:32 -04:00
|
|
|
\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.
|
2024-04-06 19:59:15 -04:00
|
|
|
|
2024-02-26 23:19:55 -05:00
|
|
|
.SH EXAMPLE
|
|
|
|
.\" SRC BEGIN (example.c)
|
|
|
|
.EX
|
|
|
|
// example.c
|
2024-04-14 01:17:32 -04:00
|
|
|
// @BAKE cc -o @{@SHORT} @FILENAME @ARGS
|
|
|
|
// or, simply, @BAKE cc -o @{$*} $@ $+
|
2024-02-26 23:19:55 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
int main (void) {
|
2024-04-14 01:17:32 -04:00
|
|
|
puts("Hello.");
|
|
|
|
return 0;
|
2024-02-26 23:19:55 -05:00
|
|
|
}
|
|
|
|
.EE
|
|
|
|
.SH COPYRIGHT
|
|
|
|
.PP
|
|
|
|
Licensed under the GNU Public License version 3 only, see <https://www.gnu.org/licenses/gpl\-3.0\-standalone.html>.
|