From 78e1cd38b6aa391989e4905ea128ab9ceea90d3b Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 24 Jan 2022 13:48:57 +0100 Subject: Add the qt-sync-to script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By popular demand, add the shell script that calls the QtSynchronizeRepo cmake script. The script synchronizes submodules that the specified module's revision depends on, as per dependencies.yaml entries. E.g. calling $ git qt-sync-to qtmultimedia will check qtbase, qtdeclarative, qtsvg, ... out as per the dependencies entries, resulting in a consistent top level source tree up to qtmultimedia. Change-Id: I2b20439c49b7973e4e405bfdc6336aadf5dcfbc2 Reviewed-by: Jörg Bornemann Reviewed-by: Alexandru Croitor Reviewed-by: Alexey Edelev --- bin/git-sync-to | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/git-sync-to (limited to 'bin') diff --git a/bin/git-sync-to b/bin/git-sync-to new file mode 100755 index 0000000..e9300e7 --- /dev/null +++ b/bin/git-sync-to @@ -0,0 +1,24 @@ +#!/bin/sh + +while [ ! -f cmake/QtSynchronizeRepo.cmake ] +do + cd .. + if [ $? -gt 0 ] + then + >&2 echo "This git command needs to be run within a Qt supermodule clone" + exit 1 + fi +done + +module="$1" +shift +revision="$1" +shift + +if [ ! -d $module ] +then + >&2 echo "Can't find worktree for the reference module '$module'" + exit 2 +fi + +cmake -DSYNC_TO_MODULE="$module" -DSYNC_TO_BRANCH="$revision" "$@" -P cmake/QtSynchronizeRepo.cmake -- cgit v1.2.1