summaryrefslogtreecommitdiffstats
path: root/b2qt-init-build-env
diff options
context:
space:
mode:
Diffstat (limited to 'b2qt-init-build-env')
-rwxr-xr-xb2qt-init-build-env28
1 files changed, 22 insertions, 6 deletions
diff --git a/b2qt-init-build-env b/b2qt-init-build-env
index f39a940..66ae73b 100755
--- a/b2qt-init-build-env
+++ b/b2qt-init-build-env
@@ -34,9 +34,10 @@ usage() {
34 echo "Usage: $(basename $0) COMMAND [ARGS]" 34 echo "Usage: $(basename $0) COMMAND [ARGS]"
35 echo 35 echo
36 echo "Initialize build environment:" 36 echo "Initialize build environment:"
37 echo " $(basename $0) init --device <name> [--reference <mirror path>] [--internal]" 37 echo " $(basename $0) init --device <name> [--reference <mirror path>] [--manifest-dir <dir path>] [--internal]"
38 echo " --device <name>: target device name or 'all'" 38 echo " --device <name>: target device name or 'all'"
39 echo " --reference <mirror path>: path to local mirror, initialized previously with '$(basename $0) mirror'" 39 echo " --reference <mirror path>: path to local mirror, initialized previously with '$(basename $0) mirror'"
40 echo " --manifest-dir <dir path>: path to a directory containing repo manifest file(s)"
40 echo " --internal: fetch internal repositories, available only inside The Qt Company network." 41 echo " --internal: fetch internal repositories, available only inside The Qt Company network."
41 echo "Initialize local mirror:" 42 echo "Initialize local mirror:"
42 echo " $(basename $0) mirror" 43 echo " $(basename $0) mirror"
@@ -62,6 +63,10 @@ while test -n "$1"; do
62 shift 63 shift
63 REPO_URL="--repo-url $1" 64 REPO_URL="--repo-url $1"
64 ;; 65 ;;
66 "--manifest-dir")
67 shift
68 MANIFEST_DIR=$1
69 ;;
65 "--internal") 70 "--internal")
66 INTERNAL="y" 71 INTERNAL="y"
67 ;; 72 ;;
@@ -87,6 +92,10 @@ if [ -n "${REFERENCE}" ]; then
87 REFERENCE="--reference $(readlink -f ${REFERENCE})" 92 REFERENCE="--reference $(readlink -f ${REFERENCE})"
88fi 93fi
89 94
95if [ -n "${MANIFEST_DIR}" ]; then
96 MANIFEST_DIR="$(readlink -f ${MANIFEST_DIR})"
97fi
98
90if [ -z "${REPO_URL}" ]; then 99if [ -z "${REPO_URL}" ]; then
91 REPO_URL="--repo-url git://github.com/theqtcompany/git-repo" 100 REPO_URL="--repo-url git://github.com/theqtcompany/git-repo"
92fi 101fi
@@ -161,9 +170,18 @@ list_devices() {
161 done 170 done
162} 171}
163 172
164mirror() { 173copy_manifests() {
165 mkdir -p .repo/manifests 174 mkdir -p .repo/manifests
166 cp ${DIR}/scripts/manifest.xml .repo/manifests/ 175 rm -f .repo/manifests/manifest*.xml
176 if [ -z "${MANIFEST_DIR}" ]; then
177 cp ${DIR}/scripts/manifest*.xml .repo/manifests/
178 else
179 cp ${MANIFEST_DIR}/manifest*.xml .repo/manifests/
180 fi
181}
182
183mirror() {
184 copy_manifests
167 MANIFEST="manifest.xml" 185 MANIFEST="manifest.xml"
168 DEVICE=${DEVICE:-all} 186 DEVICE=${DEVICE:-all}
169 get_groups 187 get_groups
@@ -179,9 +197,7 @@ init() {
179 fi 197 fi
180 198
181 get_groups 199 get_groups
182 mkdir -p .repo/manifests 200 copy_manifests
183 rm -f .repo/manifests/manifest*.xml
184 cp ${DIR}/scripts/manifest*.xml .repo/manifests
185 if [ -f .repo/manifests/manifest_${DEVICE}.xml ]; then 201 if [ -f .repo/manifests/manifest_${DEVICE}.xml ]; then
186 MANIFEST="manifest_${DEVICE}.xml" 202 MANIFEST="manifest_${DEVICE}.xml"
187 else 203 else