From 8582435db64c06ba45be0ba7cd26eeb2d89b5902 Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Thu, 21 May 2026 15:38:41 +0200 Subject: [PATCH] Add script to run all (provisioning) shell scripts in given directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To build / test Qt on a fresh VM, all provisioning scripts have to be run. Provide a shell script to facilitate this on Linux and macOS. Fixes: QTQAINFRA-7906 Pick-to: 6.8 Change-Id: Ie06c11c824897d23c74d90c008a595c2f82f6950 Reviewed-by: Simo Fält (cherry picked from commit c0e391423de577f6043c7c6747feaac0dadb50ca) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 707c9b73d17140a237abe9a20eef837b8768c6b3) --- coin/provisioning/utils/unix/qt_run_all.sh | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 coin/provisioning/utils/unix/qt_run_all.sh diff --git a/coin/provisioning/utils/unix/qt_run_all.sh b/coin/provisioning/utils/unix/qt_run_all.sh new file mode 100755 index 00000000..0f19da3a --- /dev/null +++ b/coin/provisioning/utils/unix/qt_run_all.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Copyright (C) 2026 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +# +# Usage: ./qt_run_all.sh [directory] +# Script to run all provisioning scripts in the current directory in alphabetical order +# for the purpose of manually provisioning a freshly installed Linux / macOS system +# +# Caution: +# - Don't copy this to or call it from a platform provisioning directory +# - It's not guaranteed that scripts are run in the exact same order as during COIN provisioning +# + +set -e +DIR="${1:-.}" + +DIR="$(cd "$DIR" 2>/dev/null && pwd)" || { + echo "Error: directory not found or not accessible." >&2 + exit 1 +} + +echo "Running .sh files in: $DIR" + +find "$DIR" -maxdepth 1 -name "*.sh" | sort | while IFS= read -r script; do + # Skip ourselves + [ "$(realpath "$script")" = "$(realpath "$0")" ] && continue + echo "--- Running: $script" + sh "$script" + echo "------ Done: $script (exit code: $?)" +done + +echo "Provisioning done."