diff mbox

[3/6] dpdk: don't clone DPDK repo if directory exist

Message ID 1431362411-8686-4-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss May 11, 2015, 4:40 p.m. UTC
Also, omit the dpdk subdirectory from the path, and clean up the repo in any
case.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 helper/platform/dpdk | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/helper/platform/dpdk b/helper/platform/dpdk
index 7d27628..1b99a93 100644
--- a/helper/platform/dpdk
+++ b/helper/platform/dpdk
@@ -13,17 +13,18 @@  dpdk_usage(){
 
 dpdk_prepare(){
     export DPDK_DIR=$ROOT_DIR_DPDK/dpdk/build
-    export EXTRA_FLAGS="${EXTRA_FLAGS} --with-sdk-install-path=${ROOT_DIR_DPDK}/dpdk/x86_64-native-linuxapp-gcc"
+    export EXTRA_FLAGS="${EXTRA_FLAGS} --with-sdk-install-path=${ROOT_DIR_DPDK}/x86_64-native-linuxapp-gcc"
     export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp-dpdk.git}"
 }
 
 dpdk_get(){
 
-    mkdir $ROOT_DIR_DPDK
+    if [ ! -d "$ROOT_DIR_DPDK" ]; then
+        #get DPDK - we need a specific version
+        git clone ${GIT_DPDK} $ROOT_DIR_DPDK
+    fi
     cd $ROOT_DIR_DPDK
-    #get DPDK - we need a specific version
-    git clone ${GIT_DPDK}
-    cd dpdk
+    git clean -xfd
     git checkout tags/v1.7.1
 
     #apply patch depending on cleaned up version string to fix later builds