simplified the code. re-learned the lessons from my previous custom markdown pre processing. much better...

This commit is contained in:
2024-11-18 10:02:13 -06:00
parent c08375b657
commit 3350a05b3e
34 changed files with 107 additions and 287 deletions

View File

@@ -0,0 +1,66 @@
#!/bin/bash
#Framework variables are read from hee
source vars/FrameworkVars
#Boilerplate and support functions
FrameworkIncludeFiles="$(ls -1 --color=none includes/*)"
IFS=$'\n\t'
for file in ${FrameworkIncludeFiles[@]}; do
. "$file"
done
unset IFS
if [[ ProjectIncludes = 1 ]]; then
ProjectIncludeFiles="$(ls -1 --color=none project-includes/*)"
IFS=$'\n\t'
for file in ${ProjectIncludeFiles[@]}; do
. "$file"
done
unset IFS
fi
#####
#Core framework functions...
#####
while [ ! -z "$1" ];do
case "$1" in
-h|--help)
LocalHelp
;;
-k1|--key1)
shift
KEY1="$1"
echo "key 1 is $KEY1"
;;
-k2|--key2)
shift
KEY2="$1"
echo "key 2 is $KEY2"
;;
*)
echo "Displaying $0 help..."
LocalHelp
esac
shift
done
function main()
{
StrictMode
if [ PreflightCheck = 1 ]; then
PreflightCheck
fi
#Your custom logic here....
echo "Custom logic here..."
}
main