summaryrefslogtreecommitdiffstats
path: root/b2qt-init-build-env
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2015-09-01 13:35:54 +0300
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2015-09-08 12:44:56 +0000
commit0ecf64d67502119af80c10aeb564c4e4e41789b9 (patch)
tree52edade07cff5d4283d827d888df5c975bd00b4a /b2qt-init-build-env
parent52a88e184e3d9541fd76ba09a426420691dfc81d (diff)
downloadmeta-boot2qt-0ecf64d67502119af80c10aeb564c4e4e41789b9.tar.gz
Use mirror from github to clone git-repo tool
The repo tool is normally cloned from google, but in China the url is blocked. Use mirror repo from github by default and add command line parameter to allow using a custom url. Change-Id: I91541fb1e42f8c668f7ff97d29232ca61eb3e20e Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'b2qt-init-build-env')
-rwxr-xr-xb2qt-init-build-env12
1 files changed, 10 insertions, 2 deletions
diff --git a/b2qt-init-build-env b/b2qt-init-build-env
index 0ccd952..a367d31 100755
--- a/b2qt-init-build-env
+++ b/b2qt-init-build-env
@@ -48,6 +48,10 @@ while test -n "$1"; do
48 shift 48 shift
49 DEVICE=$1 49 DEVICE=$1
50 ;; 50 ;;
51 "--repo-url")
52 shift
53 REPO_URL="--repo-url $1"
54 ;;
51 *) 55 *)
52 if [ -n "$COMMAND" ]; then 56 if [ -n "$COMMAND" ]; then
53 echo "Unknown argument: $1" 57 echo "Unknown argument: $1"
@@ -70,6 +74,10 @@ if [ -n "${REFERENCE}" ]; then
70 REFERENCE="--reference $(readlink -f ${REFERENCE})" 74 REFERENCE="--reference $(readlink -f ${REFERENCE})"
71fi 75fi
72 76
77if [ -z "${REPO_URL}" ]; then
78 REPO_URL="--repo-url git://github.com/theqtcompany/git-repo"
79fi
80
73get_repo() { 81get_repo() {
74 REPO="./repo" 82 REPO="./repo"
75 if [ -n "$(command -v repo)" ]; then 83 if [ -n "$(command -v repo)" ]; then
@@ -126,7 +134,7 @@ mirror() {
126 mkdir -p .repo/manifests 134 mkdir -p .repo/manifests
127 cp ${DIR}/scripts/manifest.xml .repo/manifests/ 135 cp ${DIR}/scripts/manifest.xml .repo/manifests/
128 MANIFEST="manifest.xml" 136 MANIFEST="manifest.xml"
129 ${REPO} init -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g all --mirror 137 ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g all --mirror
130 ${REPO} sync 138 ${REPO} sync
131} 139}
132 140
@@ -146,7 +154,7 @@ init() {
146 else 154 else
147 MANIFEST="manifest.xml" 155 MANIFEST="manifest.xml"
148 fi 156 fi
149 ${REPO} init -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" ${REFERENCE} 157 ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" ${REFERENCE}
150 ${REPO} sync 158 ${REPO} sync
151 159
152 if [ ! -e "sources/meta-b2qt" ]; then 160 if [ ! -e "sources/meta-b2qt" ]; then