More bugfixes and shellcheck tweaks

This commit is contained in:
Tyler Akins
2023-04-10 11:39:47 -05:00
parent 7604ce3054
commit 3a58ee390e
6 changed files with 47 additions and 20 deletions

View File

@@ -10,20 +10,22 @@ export ARRAY=( AAA BBB CCC )
# Include an external template
INCLUDE() {
cat "$MO_FUNCTION_ARGS"
# shellcheck disable=SC2031
cat "${MO_FUNCTION_ARGS[0]}"
}
# Print section title
TITLE() {
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
echo "$MO_FUNCTION_ARGS"
# shellcheck disable=SC2031
echo "${MO_FUNCTION_ARGS[0]}"
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
}
cat <<EOF | mo -u
{{TITLE Part 1}}
{{TITLE 'Part 1'}}
{{INCLUDE function-args-part1}}
{{TITLE Part 2}}
{{TITLE 'Part 2'}}
{{INCLUDE function-args-part2}}
EOF