Skip to content
Snippets Groups Projects
MakeQtTravisTarball.sh 827 B
Newer Older
  • Learn to ignore specific revisions
  • DonLakeFlyer's avatar
    DonLakeFlyer committed
    #!/bin/bash -x
    
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    if [ $# -ne 2 ]; then
    	echo 'MakeQtTravisTarball.sh QtDirectory BuildType'
    	exit 1
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    fi
    
    QT_DIRECTORY=$1
    if [ ! -d ${QT_DIRECTORY} ]; then
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    	echo 'Specify directory for Qt Directory to copy from.'
    	exit 1
    
    QT_FULL_VERSION=5.11.0
    QT_BASE_VERSION=5.11
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    QT_BUILD_TYPE=$2
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    if [ ! -d ${QT_DIRECTORY}/${QT_FULL_VERSION}/${QT_BUILD_TYPE} ]; then
    
            echo 'Qt build type directory not found. Specify example: clang_64'
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
        exit 1
    
    DonLakeFlyer's avatar
    DonLakeFlyer committed
    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}/