blob: c7065139e0a7fa42dcc1e6f055b49a99f86468ed [file] [log] [blame]
Dave Barach74574222016-02-01 12:05:52 -05001#!/bin/bash
2
3# includes
4rm -rf dpdk-includes
5mkdir dpdk-includes
6(cd $1/dpdk/include; tar cfh - . | (cd ../../../dpdk-includes; tar xf -))
7
Dave Wallace9c5b2b32016-05-13 22:49:36 -04008# If CDPATH is set, the "Change Directory" builtin (cd) will output the
9# destination directory when a relative path is passed as an argument.
10# In this case, this has the negative side effect of polluting the "paths"
11# variable with the destination directory, breaking the package generation.
12#
13# Patient: Doctor! Doctor! It hurts when I do this...
14# Doctor: Don't do that!
15#
16unset CDPATH
Dave Barach74574222016-02-01 12:05:52 -050017paths=`cd dpdk-includes; find . -type f -print`
18rm -f $2
19
20for path in $paths
21do
22 dir=`dirname $path`
23 if [ $dir = "." ] ; then
24 echo ../dpdk-includes/$path /usr/include/vpp-dpdk >> $2
25 else
26 echo ../dpdk-includes/$path /usr/include/vpp-dpdk/$dir >> $2
27 fi
28done
29