summaryrefslogtreecommitdiffstats
path: root/scripts/update-qt5-modules.sh
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2016-02-17 08:38:50 +0200
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2016-02-17 10:38:59 +0000
commit619d0fbab4e21abfcf53988d0a70a335dace5ef7 (patch)
tree2b937b46650265c168ded158da7b4aa72fc88d2e /scripts/update-qt5-modules.sh
parentd38bf0b3324c7b1ef629d19dcaff6398036d1659 (diff)
downloadmeta-boot2qt-619d0fbab4e21abfcf53988d0a70a335dace5ef7.tar.gz
add script to update qt5 submodule sha1s
The script can be used to easily update SHA1s to all qt5 submodule recipes. It takes SHA1s from a checked out qt5 super repo (without updating it). Change-Id: I15771e4da5f5728db6bb2cd87fdb6fdd3bf5da7a Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
Diffstat (limited to 'scripts/update-qt5-modules.sh')
-rwxr-xr-xscripts/update-qt5-modules.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/update-qt5-modules.sh b/scripts/update-qt5-modules.sh
new file mode 100755
index 0000000..a0c9ea9
--- /dev/null
+++ b/scripts/update-qt5-modules.sh
@@ -0,0 +1,49 @@
1#!/bin/bash
2##############################################################################
3##
4## Copyright (C) 2016 The Qt Company Ltd.
5## Contact: http://www.qt.io/licensing/
6##
7## This file is part of the Boot to Qt meta layer.
8##
9## $QT_BEGIN_LICENSE:COMM$
10##
11## Commercial License Usage
12## Licensees holding valid commercial Qt licenses may use this file in
13## accordance with the commercial license agreement provided with the
14## Software or, alternatively, in accordance with the terms contained in
15## a written agreement between you and The Qt Company. For licensing terms
16## and conditions see http://www.qt.io/terms-conditions. For further
17## information use the contact form at http://www.qt.io/contact-us.
18##
19## $QT_END_LICENSE$
20##
21##############################################################################
22
23if [ $# -ne 1 ]; then
24 echo "Usage: $0 <qt5.git>"
25 echo "Update SRCREVs for all Qt modules in the current folder."
26 echo "The <qt5.git> is path to the qt5 super repo, where modules' SHA1 is taken."
27 exit 1
28fi
29
30SHA1S=$(git -C $1 submodule status --recursive | cut -c2- | awk '{print $1$2}')
31
32for S in $SHA1S; do
33 SHA1=${S:0:40}
34 PROJECT=${S:40}
35
36 if [ "${PROJECT}" = "qtwebengine" ]; then
37 sed -i -e "/^SRCREV_qtwebengine/s/\".*\"/\"${SHA1}\"/" qtwebengine_git.bb*
38 echo "${PROJECT} -> ${SHA1}"
39 elif [ "${PROJECT}" = "qtwebengine/src/3rdparty" ]; then
40 sed -i -e "/^SRCREV_chromium/s/\".*\"/\"${SHA1}\"/" qtwebengine_git.bb*
41 echo "qtwebengine (chromium) -> ${SHA1}"
42 elif [ "$(echo *${PROJECT}*_git.bb*)" != "*${PROJECT}*_git.bb*" ]; then
43 sed -i -e "/^SRCREV/s/\".*\"/\"${SHA1}\"/" *${PROJECT}*_git.bb*
44 echo "${PROJECT} -> ${SHA1}"
45 else
46 echo "${PROJECT} -> no recipe found"
47 fi
48done
49