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.

77 lines
1.9KB

  1. .TH BAKE "1" "April 2024" "bake 20240413" "User Commands"
  2. .SH NAME
  3. .B bake
  4. \- file embeddable scripts
  5. .SH SYNOPSIS
  6. .B bake
  7. [option] target\-file [\fBarguments\fP ...]
  8. .SH DESCRIPTION
  9. Use the format \fB@BAKE\fP cmd ... within the target\-file, this will execute the
  10. rest of line, or until the first \fB@STOP\fR marker.
  11. This format may be embedded within \fBbinary files\fP, or any file where no unwanted preceding
  12. instance of
  13. .B @BAKE
  14. appears.
  15. \fBShake\fP does not support some features of \fBBake\fP, such as \fB@STOP\fP or \fBbinary files\fP,
  16. please avoid its use.
  17. Options must always be put first, and may be merged together.
  18. .HP
  19. \-v \-\-version, \-h \-\-help, \fB\-n \-\-dry\-run\fP, \fB\-x \-\-expunge\fP,
  20. \fB\-c \-\-color\fP
  21. .PP
  22. Expansions
  23. These symbols will expand to their counterpart before execution.
  24. .TP
  25. .B @FILENAME, $@
  26. returns target\-file (abc.x.txt)
  27. .TP
  28. .B @SHORT, $*
  29. returns target\-file without suffix (abc.x.txt \-> abc.x)
  30. .TP
  31. .B @ARGS, $+
  32. returns
  33. .B arguments
  34. .PP
  35. Additional Features And Notes
  36. Shell execution may be disabled with the
  37. .B -n or --dry-run
  38. option.
  39. \fB@{\fPEXPUNGE_THIS_FILE\fB}\fP is a inline block to delete files or
  40. directories, non-recursive, only one file per block, removed from left to right.
  41. Has no influence on the normal command execution. The deletion only occurs if
  42. you use the
  43. .B -x or --expunge
  44. option.
  45. Colors may be disabled with the
  46. .B -c or --color
  47. option.
  48. \\SPECIAL_NAME will result in SPECIAL_NAME in the executed shell
  49. command. Backslashes are applicable to all symbols used by Bake, they are
  50. ignored otherwise.
  51. .SH EXAMPLE
  52. .\" SRC BEGIN (example.c)
  53. .EX
  54. // example.c
  55. // @BAKE cc -o @{@SHORT} @FILENAME @ARGS
  56. // or, simply, @BAKE cc -o @{$*} $@ $+
  57. #include <stdio.h>
  58. int main (void) {
  59. puts("Hello.");
  60. return 0;
  61. }
  62. .EE
  63. .SH COPYRIGHT
  64. .PP
  65. Licensed under the GNU Public License version 3 only, see <https://www.gnu.org/licenses/gpl\-3.0\-standalone.html>.