From 61dc23304458497bb1211ec0d821d6486bbcad66 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 25 Mar 2024 09:03:50 +0100 Subject: [PATCH] init-repository: Check for cmake And bail out with proper warning if cmake is missing Change-Id: I39a9e340f873f8de05264d57b2a80fb754b30fbe Reviewed-by: Alexey Edelev --- init-repository | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init-repository b/init-repository index 8a4469bf..8becca95 100755 --- a/init-repository +++ b/init-repository @@ -10,6 +10,12 @@ script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` optfile=init-repository.opt opttmpfile=init-repository.opt.in +# check whether cmake exists +if ! [ -x "$(command -v cmake)" ]; then + echo "Error: cmake was not found. You need to install it before configuring Qt." + exit 1 +fi + # Posix compatible way to truncate file : > "$optfile" : > "$opttmpfile"