File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,18 @@ NC='\033[0m' # No Color
88
99FAILED=
1010
11+ check_perl_module () {
12+
13+ printf " Checking %35s:" " $1 "
14+
15+ if perl -M" $1 " -e1 2> /dev/null ; then
16+ printf " [${GREEN} OK${NC} : %-35s]\n" " $1 "
17+ else
18+ ERROR=" $1 not found"
19+ printf " [${RED} error${NC} : %-35s]\n" " ${ERROR} "
20+ fi
21+ }
22+
1123check_required () {
1224
1325 printf " Checking %35s:" " $1 "
@@ -39,6 +51,24 @@ check_optional() {
3951
4052}
4153
54+ check_shunit2 () {
55+
56+ printf " Checking %35s:" shunit2
57+
58+ PROG=$( command -v shunit2 2> /dev/null)
59+ if [ -z " ${PROG} " ] ; then
60+ if [ -x /usr/share/shunit2/shunit2 ] ; then
61+ PROG=/usr/share/shuni2/shunit2
62+ fi
63+ fi
64+ if [ -z " ${PROG} " ]; then
65+ ERROR=" shunit2 not found"
66+ printf " [${YELLOW} error${NC} : %-35s]\n" " ${ERROR} "
67+ else
68+ printf " [${GREEN} OK${NC} : %-35s]\n" " ${PROG} "
69+ fi
70+ }
71+
4272printf " \nChecking required dependencies:\n\n"
4373
4474check_required bc
@@ -69,8 +99,9 @@ printf "\nChecking optional dependencies for development:\n\n"
6999check_optional dig
70100check_optional shellcheck
71101check_optional shfmt
72- check_optional shunit2
102+ check_shunit2
73103check_optional tinyproxy
104+ check_perl_module Date::Parse
74105
75106
76107if [ -n " ${FAILED} " ] ; then
You can’t perform that action at this time.
0 commit comments