mirror of
https://git.lain.church/bake/bake.git
synced 2025-05-15 08:06:43 +00:00
115 lines
3.6 KiB
Plaintext
Executable File
115 lines
3.6 KiB
Plaintext
Executable File
--- README
|
|
|
|
Run embedded scripts.
|
|
|
|
Bootstrap with ./awake bake.l
|
|
then compile further with ./bake,
|
|
|
|
or JUST install by running ./install.sh (has --help)
|
|
|
|
---
|
|
|
|
bake [-chln] [-s <n>] <FILENAME> [ARGS...]; version 20250104
|
|
|
|
Bake is a simple tool meant to execute embedded shell commands within
|
|
any file. It executes with /bin/sh the command after a "@BAKE " to
|
|
the end of the line (a UNIX newline: '\n') or to the first instance
|
|
of @STOP. All @BAKE ... @STOP statements must become before any @BAKE
|
|
... EOLs.
|
|
|
|
It expands some macros,
|
|
@FILE - filename
|
|
@SHORT - filename without suffix (abc.x.txt \-> abc.x)
|
|
@SHORT:N - removes N suffixes, so (a.b.c 2 -> a)
|
|
@ARGS - other arguments to the program
|
|
@ARGS:N - Provides the Nth argument, starting from 0
|
|
@ARGS:N+ - All arguments at and after Nth
|
|
@RECURS - the full path name to the executable
|
|
@LINE - line number at the selected @BAKE
|
|
|
|
All macros can be exempted by prefixing them with a backslash,
|
|
which'll be subtracted in the expansion. commands may be spanned over
|
|
several lines with a leading backslash.
|
|
|
|
-h --help | Help message
|
|
-n --dry-run | don't execute or remove anything
|
|
-c --color | disables color
|
|
-l --list | lists available Bake blocks
|
|
-s --select <n> | selects Nth Bake block
|
|
-x --expunge | Removes the file specified in the expunge block
|
|
|
|
It roots the shell execution in the directory of the given file.
|
|
|
|
Licensed under the public domain.
|
|
|
|
---
|
|
|
|
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, optionally installation and as the
|
|
old bootstrapper. The modified version includes all features of Bake
|
|
with the exceptions of multi-line commands and usable expunge.
|
|
|
|
Changelog
|
|
|
|
Bake was created on 2023/09/13, and complete as of 2024/03/02.
|
|
|
|
2024-03-02
|
|
|
|
Initial relaase
|
|
|
|
2024-04-04
|
|
|
|
Expunge & color.
|
|
|
|
2024-04 - 2024-08 - 3 Tags of bump -> minor fixes and improvements
|
|
|
|
2024-09-27
|
|
|
|
Lex. As adviced by the original creator, I learned and implemented
|
|
a Bake with lex. It's fully featured, and has new stuff.
|
|
|
|
2024-10-24
|
|
- Awake
|
|
|
|
Egor (some dead guy) made an AWK implementation of Bake, it's POSIX.
|
|
It doesn't support multi-line, expunge, parses options after filename,
|
|
or changing directory to file's directory - it's compatible with Bake
|
|
otherwise. It's the new bootstrapper as AWK should be more portable
|
|
to the BSDs.
|
|
|
|
cd /dir/of/file; awake file
|
|
See --help
|
|
|
|
2025-01-04
|
|
|
|
Introducing some breaking changes.
|
|
Remove @FILENAME @NAME, and @FILE_NAME (heyo) leaving only @FILE.
|
|
Upgraded ./install.sh to have options.
|
|
|
|
s/@(FILE_?NAME|NAME)/@FILE/g
|
|
|
|
I'm finished with tool for the rest of time and have put zero effort
|
|
into it this time. If I use it and it breaks, I'll fix it or replace
|
|
it with something better.
|
|
|
|
Anonson, the original creator made a ebuild for Gentoo a few months
|
|
ago, and I will link it here when I receive that link from him. I may
|
|
one day dare to package Bake as a deb. I would likely have to rename
|
|
bake to ebake, which is somehow worse than the original name of eMake.
|
|
|
|
ebuild:
|
|
See <https://bis64wqhh3louusbd45iyj76kmn4rzw5ysawyan5bkxwyzihj67c5lid.onion/anon/agvxov-overlay>
|
|
|
|
packaged under the agvxov overlay as dev-build/bake, see the README
|
|
for including this into your installation.
|
|
|
|
debian: Provided in repo, run...
|
|
./deb/package
|
|
dpkg -i deb/bake.deb
|