--- README
-A tool to run embedded scripts.
+Run embedded scripts.
-Bootstrap with ./shake bake.l
+Bootstrap with ./awake bake.l
then compile further with ./bake,
-install by running ./install.sh
+
+or JUST install by running ./install.sh (has --help)
---
... EOLs.
It expands some macros,
- @FILENAME @FILE @NAME - filename
+ @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 - 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
which'll be subtracted in the expansion. commands may be spanned over
several lines with a leading backslash.
--h --help | Help message
+-h --help | Help message
-n --dry-run | don't execute or remove anything
--c --color | disables color
--l --list | lists available Bake blocks
+-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
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
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: <PENDING>
+debian: <PENDING> (perhaps forever)
#!/bin/sh
# source install
+cd "$(dirname "$(readlink -f $0)")" || exit
+
TARGET="${TARGET:-/usr/local}"
INSTALL="bake"
echo ""
echo "--alternatives Includes awake and shake into the build"
echo "--target=DIRECTORY Target directory like /usr or /usr/local"
+ echo "--prebuilt Program is prebuilt"
echo ""
exit 1
}
"--help")
usage
;;
+ "--prebuilt")
+ BUILD=1
+ ;;
*)
echo "Unknown option: " $1
usage
shift
done
-cd "$(dirname "$(readlink -f $0)")"
+if [ -z $BUILD ]; then
+ ./awake bake.l
+fi
-./awake bake.l
mkdir -p "$TARGET/bin" "$TARGET/man/man1"
install -m 755 $INSTALL "$TARGET/bin"
gzip -c bake.1 > "$TARGET/man/man1/bake.1.gz"
line=${line//\$@/$input_file}
line=${line//\$\*/${input_file%.*}}
line=${line//\$+/$@}
- line=${line//@FILE_NAME/$input_file}
line=${line//@FILENAME/$input_file}
line=${line//@SHORT/${input_file%.*}}
line=${line//@ARGS/$@}
- line=${line//@NAME/$input_file}
- line=${line//@FILE/$input_file}
line=$(echo "$line" | sed 's/@STOP.*//')
echo -e "${BOLD}${GREEN}$0${NORMAL}: ${line#*${MARK}}"