initial commit

This commit is contained in:
2020-12-20 16:29:13 -06:00
commit 996447f494
5 changed files with 358 additions and 0 deletions

33
do.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# Do - The Simplest Build Tool on Earth.
# Documentation and examples see https://github.com/8gears/do
set -Eeuo pipefail # -e "Automatic exit from bash shell script on error" -u "Treat unset variables and parameters as errors"
build() {
echo "I am ${FUNCNAME[0]}ing"
latexmk -pdflatex="luahblatex %O %S" -pdf -dvi- -ps- -quiet -logfilewarninglist
}
all() {
build
}
clean() {
echo "I am ${FUNCNAME[0]}ing"
latexmk -C
rm -f *.bbl *.run.xml
}
tidy() {
echo "I am ${FUNCNAME[0]}ing"
latexmk -c
}
_hidden() {
echo "I am a hidden task and won't appear in the usage desciption because I start with an _ (underscore). If you know me you can still call me directly"
}
"$@" # <- execute the task
[ "$#" -gt 0 ] || printf "Usage:\n\t./do.sh %s\n" "($(compgen -A function | grep '^[^_]' | paste -sd '|' -))"