diff options
author | 2017-03-29 01:15:02 -0400 | |
---|---|---|
committer | 2017-03-29 02:23:59 -0400 | |
commit | a23197980e40d4d9414bcfaf59005a1dc2a89251 (patch) | |
tree | da3fc5410a9cda99e05d2e0f6dae06072a0c50b8 /vpp/build-root/scripts/find-dpdk-contents | |
parent | 746b57564deede624261ab8a96c94f562f24d22c (diff) |
Added vpp intial source code from master branch 17.01.1
Change-Id: I81bdace6f330825a1746a853766779dfb24765fd
Signed-off-by: sreejith <sreejith.surendrannair@linaro.org>
Diffstat (limited to 'vpp/build-root/scripts/find-dpdk-contents')
-rwxr-xr-x | vpp/build-root/scripts/find-dpdk-contents | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vpp/build-root/scripts/find-dpdk-contents b/vpp/build-root/scripts/find-dpdk-contents new file mode 100755 index 00000000..c7065139 --- /dev/null +++ b/vpp/build-root/scripts/find-dpdk-contents @@ -0,0 +1,29 @@ +#!/bin/bash + +# includes +rm -rf dpdk-includes +mkdir dpdk-includes +(cd $1/dpdk/include; tar cfh - . | (cd ../../../dpdk-includes; tar xf -)) + +# If CDPATH is set, the "Change Directory" builtin (cd) will output the +# destination directory when a relative path is passed as an argument. +# In this case, this has the negative side effect of polluting the "paths" +# variable with the destination directory, breaking the package generation. +# +# Patient: Doctor! Doctor! It hurts when I do this... +# Doctor: Don't do that! +# +unset CDPATH +paths=`cd dpdk-includes; find . -type f -print` +rm -f $2 + +for path in $paths +do + dir=`dirname $path` + if [ $dir = "." ] ; then + echo ../dpdk-includes/$path /usr/include/vpp-dpdk >> $2 + else + echo ../dpdk-includes/$path /usr/include/vpp-dpdk/$dir >> $2 + fi +done + |