24 lines
556 B
Bash
Executable File
24 lines
556 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
# This script is used to generate the output files and replacing
|
|
# variables used with ones setup in the vars.sh file.
|
|
|
|
|
|
OUT_DIR=${OUT_DIR:-"outfiles"}
|
|
OUT_FILE=${OUT_FILE:-"Report.out.md"}
|
|
IN_FILE=${IN_FILE:-"Report.md"}
|
|
local footer="resources/footer.template.tex"
|
|
local footer_out="${OUT_DIR}/footer.tex"
|
|
|
|
if [ ! -d "$OUT_DIR" ]; then
|
|
mkdir "$OUT_DIR"
|
|
fi
|
|
|
|
echo "Writing footer to: ${footer_out}"
|
|
|
|
(source vars.sh; envsubst < "$footer" > "$footer_out")
|
|
|
|
echo "Writing to: ${OUT_FILE}"
|
|
|
|
(source vars.sh; envsubst < "$IN_FILE" > "$OUT_FILE")
|