aboutsummaryrefslogtreecommitdiffstats
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
parent52a88e184e3d9541fd76ba09a426420691dfc81d (diff)
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>
-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 0ccd9521..a367d31e 100755
--- a/b2qt-init-build-env
+++ b/b2qt-init-build-env
@@ -48,6 +48,10 @@ while test -n "$1"; do
shift
DEVICE=$1
;;
+ "--repo-url")
+ shift
+ REPO_URL="--repo-url $1"
+ ;;
*)
if [ -n "$COMMAND" ]; then
echo "Unknown argument: $1"
@@ -70,6 +74,10 @@ if [ -n "${REFERENCE}" ]; then
REFERENCE="--reference $(readlink -f ${REFERENCE})"
fi
+if [ -z "${REPO_URL}" ]; then
+ REPO_URL="--repo-url git://github.com/theqtcompany/git-repo"
+fi
+
get_repo() {
REPO="./repo"
if [ -n "$(command -v repo)" ]; then
@@ -126,7 +134,7 @@ mirror() {
mkdir -p .repo/manifests
cp ${DIR}/scripts/manifest.xml .repo/manifests/
MANIFEST="manifest.xml"
- ${REPO} init -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g all --mirror
+ ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g all --mirror
${REPO} sync
}
@@ -146,7 +154,7 @@ init() {
else
MANIFEST="manifest.xml"
fi
- ${REPO} init -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" ${REFERENCE}
+ ${REPO} init ${REPO_URL} -u ${PWD}/.repo/repo -b default -m ${MANIFEST} -g "${PROJECT_GROUPS}" ${REFERENCE}
${REPO} sync
if [ ! -e "sources/meta-b2qt" ]; then