Use loop for interface functions

This commit is contained in:
Bob Mottram 2016-07-05 11:41:33 +01:00
parent 4123b712fc
commit cf4a38367e

View File

@ -64,11 +64,17 @@ function test_app_functions {
FILES=/usr/bin/${PROJECT_NAME}-app-* FILES=/usr/bin/${PROJECT_NAME}-app-*
fi fi
# check that these functions exist
interface_functions=( install remove backup )
# for all the app scripts
for filename in $FILES for filename in $FILES
do do
test_app_function_type ${filename} install # for each expected interface function
test_app_function_type ${filename} remove for f in "${interface_functions[@]}"
test_app_function_type ${filename} backup do
test_app_function_type ${filename} $f
done
done done
} }