Built and documented more logic functions, started an exit codes help section adding exit codes as I go. Ceated a tester script for testing logic functions from functions.lib.sh without the need to run the entire code base.

This commit is contained in:
2026-04-02 10:21:29 +02:00
parent 1c648f2739
commit 38562c1d55
7 changed files with 758 additions and 36 deletions

View File

@@ -0,0 +1,43 @@
declare etcdirectory="/etc/debmirrorman"
declare -a localrepos=(
"apache2"
"bind"
"nginx"
"php"
)
declare -A prettynames=(
[apache2]="Apache2 Repo"
[bind]="Bind9 Repo"
[nginx]="Nginx Repo"
[php]="PHP Repo"
)
function preTest {
local repo
echo "localrepos = ${localrepos[@]}"
echo "prettynames ="
for repo in ${localrepos[@]}; do
echo " [${repo}] = ${prettynames[${repo}]}"
done
echo
}
function postTest {
local repo
echo
echo "localrepos = ${localrepos[@]}"
echo "prettynames ="
for repo in ${localrepos[@]}; do
echo " [${repo}] = ${prettynames[${repo}]}"
done
echo
}