diff options
Diffstat (limited to 'scripts/update-qt5-modules.sh')
-rwxr-xr-x | scripts/update-qt5-modules.sh | 49 |
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 | |||
23 | if [ $# -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 | ||
28 | fi | ||
29 | |||
30 | SHA1S=$(git -C $1 submodule status --recursive | cut -c2- | awk '{print $1$2}') | ||
31 | |||
32 | for 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 | ||
48 | done | ||
49 | |||