clone-qt.sh 838 Bytes
Newer Older
1 2 3
#!/bin/bash
set -ex
qt5_rev=${QT_DOCKERTEST_QT5_REV:-5.11}
Johan Helsing's avatar
Johan Helsing committed
4 5 6 7 8 9

srcdir=$(pwd)/qt5
rm -rf $srcdir
mkdir $srcdir
cd $srcdir

10 11 12 13 14
git init
git remote add origin https://codereview.qt-project.org/qt/qt5.git
git fetch --depth 1 origin "$qt5_rev"
git checkout FETCH_HEAD

15
#proper shallow cloning doesn't work for Debian Stretch for some reason
16
#git submodule update --init --depth 1 -- qtbase qtxmlpatterns qtdeclarative qtwayland
17
#git submodule update --init --depth 50 -- qtbase qtxmlpatterns qtdeclarative qtwayland
18 19
#git submodule update --init --depth 200 -- qtbase qtxmlpatterns qtdeclarative qtwayland
git submodule update --init -- qtbase qtxmlpatterns qtdeclarative qtwayland
20 21

if [[ -v QT_DOCKERTEST_QTWAYLAND_REV ]] ; then
Johan Helsing's avatar
Johan Helsing committed
22
    cd "$srcdir/qtwayland"
23 24 25
    git fetch --depth 1 origin "$QT_DOCKERTEST_QTWAYLAND_REV"
    git checkout FETCH_HEAD
fi