12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #!/bin/bash
- # Arguments = -r qtbase,qtdeclarative,...,qtxmlpatterns -f
- set -e
- usage()
- {
- cat << EOF
- usage: $0 options
- This script will download and sync tizen repos with upstream
- OPTIONS:
- -h Show this message
- -r REPO_LIST comma separated list of qt repositories to clone
- -p PREFIX repo prefix
-
- example:
- $0 -r qtbase,qtdeclarative,qtquickcontrols-tizen -p http://git.gitorious.org/qt/qt-for-tizen-packaging-
- EOF
- }
- qtparts=""
- while getopts ":hr:p:" opt; do
- case $opt in
- h)
- usage
- exit
- ;;
- r)
- qtparts=$(echo $OPTARG| sed "s/,/ /gi")
- ;;
- ?)
- echo "Invalid option: -$OPTARG"
- usage
- exit
- ;;
- esac
- done
- if [ "$repo_prefix" == "" ]; then
- repo_prefix=http://git.gitorious.org/qt/qt-for-tizen-packaging-
- fi
- if [ "$qtparts" == "" ]; then
- parts="qtchooser qtbase qtxmlpatterns qtdeclarative qtgraphicaleffects qtimageformats qtquickcontrols qtquickcontrols-tizen qtsensors qttools qtwayland qtmultimedia"
- else
- parts="$qtparts"
- fi
- SCRIPTDIR=$(dirname $0)
- source $SCRIPTDIR/../common/qt_for_tizen_version
- for qtrepo in $parts; do
- if [ -d "$qtrepo" ]; then
- echo =============================================
- echo $qtrepo already exists - syncing with origin
- echo =============================================
- cd $qtrepo
- git fetch origin
- git checkout $QT_FOR_TIZEN_PACKAGING_BRANCH
- git reset --hard origin/$QT_FOR_TIZEN_PACKAGING_BRANCH
- cd ..
- else
- echo =============================================
- echo cloning $qtrepo
- echo =============================================
- git clone -b $QT_FOR_TIZEN_PACKAGING_BRANCH $repo_prefix$qtrepo.git $qtrepo
- fi
- done
|