commit e0826ecff1484574bde89ad6695d0f7b5a62f6a2 Author: Brice Goglin Date: Sun Nov 21 19:53:21 2010 +0100 Gather empty directories in linux test tarballs Otherwise the behavior between actual machine and topology tarballs may differ a bit. This will help debugging some problems remotely. diff --git a/tests/linux/hwloc-gather-topology.sh.in b/tests/linux/hwloc-gather-topology.sh.in index 022b30e..536c0fc 100755 --- a/tests/linux/hwloc-gather-topology.sh.in +++ b/tests/linux/hwloc-gather-topology.sh.in @@ -45,8 +45,12 @@ destdir=`mktemp -d` savepath() { local dest="$1" local path="$2" + # gather all directories, including empty ones + find "$path" -type d 2>/dev/null | while read dir ; do \ + mkdir -p "$dest/$dir" 2>/dev/null ; \ + done + # gather all files now find "$path" -type f 2>/dev/null | while read file ; do \ - mkdir -p "$dest/"`dirname $file` ; \ cat "$file" > "$dest/$file" 2>/dev/null ; \ done }