ReachableCEO-Profile-FullTi.../vendor/git.knownelement.com/ExternalVendorCode/mo/demo/function-args
Charles N Wyble 0fc507c735 Squashed 'vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/' content from commit 7454bad
git-subtree-dir: vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline
git-subtree-split: 7454badfb02566a9d74a8a70c687daa4a8488850
2024-12-10 17:11:26 -06:00

32 lines
705 B
Bash
Executable File

#!/usr/bin/env bash
#
# This sources a simple script with the env. variables needed for the template.
cd "$(dirname "$0")" # Go to the script's directory
source ../mo
export NAME="Alex"
export ARRAY=( AAA BBB CCC )
# Include an external template
INCLUDE() {
# shellcheck disable=SC2031
cat "${MO_FUNCTION_ARGS[0]}"
}
# Print section title
TITLE() {
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
# shellcheck disable=SC2031
echo "${MO_FUNCTION_ARGS[0]}"
echo "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
}
cat <<EOF | mo -u
{{TITLE 'Part 1'}}
{{INCLUDE 'function-args-part1'}}
{{TITLE 'Part 2'}}
{{INCLUDE 'function-args-part2'}}
EOF