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:
43
source/samplerepos.testfile
Normal file
43
source/samplerepos.testfile
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user