|
@@ -62,15 +62,18 @@ if [[ "$CHECK_TC" = "yes" ]]; then
|
|
check_tc_version
|
|
check_tc_version
|
|
fi
|
|
fi
|
|
|
|
|
|
-if [[ ! -x "$(command -v jq)" ]]; then
|
|
|
|
- echo "SKIP: jq not installed"
|
|
|
|
- exit 1
|
|
|
|
-fi
|
|
|
|
|
|
+require_command()
|
|
|
|
+{
|
|
|
|
+ local cmd=$1; shift
|
|
|
|
|
|
-if [[ ! -x "$(command -v $MZ)" ]]; then
|
|
|
|
- echo "SKIP: $MZ not installed"
|
|
|
|
- exit 1
|
|
|
|
-fi
|
|
|
|
|
|
+ if [[ ! -x "$(command -v "$cmd")" ]]; then
|
|
|
|
+ echo "SKIP: $cmd not installed"
|
|
|
|
+ exit 1
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+require_command jq
|
|
|
|
+require_command $MZ
|
|
|
|
|
|
if [[ ! -v NUM_NETIFS ]]; then
|
|
if [[ ! -v NUM_NETIFS ]]; then
|
|
echo "SKIP: importer does not define \"NUM_NETIFS\""
|
|
echo "SKIP: importer does not define \"NUM_NETIFS\""
|