[yocto] [PATCHv2 1/3] scripts/build.sh: Added function to use the local repository for building

mail at timomueller.eu mail at timomueller.eu
Mon Dec 10 00:13:42 PST 2012


From: Timo Mueller <timo.mueller at bmw-carit.de>

If USE_LOCAL_GIT_REPO is set to 1 the build scripts uses the local
repository of the eclipse poky project for building instead of the
upstream project. The local repository is derived from the location
for the build script.
---
 scripts/build.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/scripts/build.sh b/scripts/build.sh
index de81ce3..cbb7375 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -65,6 +65,8 @@ check_env ()
   fi 
 }
 
+USE_LOCAL_GIT_REPO=0
+
 if [ $# -ne 2 ] && [ $# -ne 3 ]; then 
    help
 fi
@@ -97,6 +99,12 @@ mkdir ${BUILD_DIR} || fail $? "Create temporary build directory ${BUILD_DIR}"
 
 #git clone
 GIT_URL=git://git.pokylinux.org/eclipse-poky.git
+if [ $USE_LOCAL_GIT_REPO -eq 1 ]; then
+	SCRIPT_DIR=`dirname $0`
+	GIT_DIR=`readlink -f ${SCRIPTDIR}\..`
+	GIT_URL="file://${GIT_DIR}"
+fi
+
 GIT_DIR=${BUILD_SRC}
 #mkdir ${GIT_DIR}
 #cp -r features/ ${GIT_DIR}
-- 
1.7.7.6




More information about the yocto mailing list