Use loop for interface functions
This commit is contained in:
parent
4123b712fc
commit
cf4a38367e
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user