From b8294a0189db654a08a14cde8264904abccd5cdd Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Mon, 5 Jun 2023 17:14:04 +0300 Subject: [PATCH] MT#55285 Try local ngcp-dump-json.pl instead of installed Instead of using the script which is installed - use the one from review. If it's missing for some reason - try installed one. So you can see if there is any problem with build tools when you create a review not after you merged it. Change-Id: I9725db44f94c77099bdc9e50db41596fb2f29061 --- build_utils/ngcp-build-schema-files | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build_utils/ngcp-build-schema-files b/build_utils/ngcp-build-schema-files index 88160cb5..40540bf8 100755 --- a/build_utils/ngcp-build-schema-files +++ b/build_utils/ngcp-build-schema-files @@ -2,11 +2,17 @@ set -euEo pipefail -ngcp_dump_json_cmd="/usr/share/ngcp-db-schema/helper/ngcp-dump-json.pl" +tools_dir="$(dirname "$0")" +ngcp_dump_json_cmd="${tools_dir}/ngcp-dump-json.pl" if [[ ! -x "${ngcp_dump_json_cmd}" ]]; then echo "Can't find executable ${ngcp_dump_json_cmd}" >&2 - echo "Please install ngcp-db-schema package" >&2 - exit 1 + echo "Failing back to installed one" >&2 + ngcp_dump_json_cmd="/usr/share/ngcp-db-schema/helper/ngcp-dump-json.pl" + if [[ ! -x "${ngcp_dump_json_cmd}" ]]; then + echo "Can't find executable ${ngcp_dump_json_cmd}" >&2 + echo "Please install ngcp-db-schema package" >&2 + exit 1 + fi fi mariadb_dir=$(mktemp -d /tmp/mariadb-build.XXXXXX)