MakeQtTravisTarball.sh 818 Bytes
Newer Older
DonLakeFlyer's avatar
DonLakeFlyer committed
1 2
#!/bin/bash -x

DonLakeFlyer's avatar
DonLakeFlyer committed
3 4 5
if [ $# -ne 2 ]; then
	echo 'MakeQtTravisTarball.sh QtDirectory BuildType'
	exit 1
DonLakeFlyer's avatar
DonLakeFlyer committed
6 7 8 9
fi

QT_DIRECTORY=$1
if [ ! -d ${QT_DIRECTORY} ]; then
DonLakeFlyer's avatar
DonLakeFlyer committed
10 11
	echo 'Specify directory for Qt Directory to copy from.'
	exit 1
DonLakeFlyer's avatar
DonLakeFlyer committed
12 13
fi

DonLakeFlyer's avatar
DonLakeFlyer committed
14 15
QT_FULL_VERSION=5.9.3
QT_BASE_VERSION=5.9
DonLakeFlyer's avatar
DonLakeFlyer committed
16

DonLakeFlyer's avatar
DonLakeFlyer committed
17
QT_BUILD_TYPE=$2
DonLakeFlyer's avatar
DonLakeFlyer committed
18
if [ ! -d ${QT_DIRECTORY}/${QT_FULL_VERSION}/${QT_BUILD_TYPE} ]; then
DonLakeFlyer's avatar
DonLakeFlyer committed
19 20
	echo 'Qt build type directory not found. Specify example: clang_62'
    exit 1
DonLakeFlyer's avatar
DonLakeFlyer committed
21 22 23 24 25 26
fi

mkdir -p Qt${QT_BASE_VERSION}-${QT_BUILD_TYPE}/${QT_FULL_VERSION}/${QT_BUILD_TYPE}
cp -r ${QT_DIRECTORY}/${QT_FULL_VERSION}/${QT_BUILD_TYPE} Qt${QT_BASE_VERSION}-${QT_BUILD_TYPE}/${QT_FULL_VERSION}
rm -rf Qt${QT_BASE_VERSION}-${QT_BUILD_TYPE}/${QT_FULL_VERSION}/${QT_BUILD_TYPE}/doc
tar -jcvf Qt${QT_FULL_VERSION}-${QT_BUILD_TYPE}-min.tar.bz2 Qt${QT_BASE_VERSION}-${QT_BUILD_TYPE}/