4 echo "$0" '<hwloc-X.Y.Z.tar.(gz|bz2)>'
10 echo "$(cd "$
(dirname "$1")" && pwd)/$(basename "$1")"
13 # Get the absolute path of the tarball now so it is valid after we chdir
14 input
=$
(get_abs_filename
"$1")
16 pushd $
(dirname "$0") > /dev
/null
18 # Refresh the folder contents
22 extension
="${input##*.}"
23 if [ "$extension" = "gz" ]; then
24 tar -xzf "$input" --strip-components=1
25 elif [ "$extension" = "bz2" ]; then
26 tar -xjf "$input" --strip-components=1
28 echo "Error: Unexpected file type."
32 # Strip out data unused by embedded builds to save the git repository and gathertree some work
33 DIST_SUBDIRS
=( utils tests doc contrib
/systemd
doc
/examples utils
/hwloc utils
/lstopo
tests
/linux
tests
/linux
/allowed
tests
/linux
/gather
tests
/xml
tests
/ports
tests
/rename
)
34 EXTRA_DIST
=( contrib
/windows
)
35 for i
in "${DIST_SUBDIRS[@]}" "${EXTRA_DIST[@]}"; do
38 # Create stub automake files because the disabling is a configure-time option, so automake always checks them
39 for i
in "${DIST_SUBDIRS[@]}"; do
41 touch "$i/Makefile.am"
44 rm -f "configure" "Makefile.in" "include/Makefile.in" "src/Makefile.in"
46 touch tests
/linux
/allowed
/test-topology.sh.am
47 touch tests
/linux
/gather
/test-gather-topology.sh.am
48 touch tests
/xml
/test-topology.sh.am
49 touch doc
/doxygen-config.cfg.am
50 touch tests
/wrapper.sh.am
51 touch tests
/linux
/test-topology.sh.am
52 touch utils
/hwloc
/hwloc-assembler-remote.am
53 touch utils
/hwloc
/hwloc-compress-dir.am
54 touch utils
/hwloc
/hwloc-gather-topology.am
55 touch utils
/hwloc
/test-hwloc-annotate.sh.am
56 touch utils
/hwloc
/test-hwloc-assembler.sh.am
57 touch utils
/hwloc
/test-hwloc-calc.sh.am
58 touch utils
/hwloc
/test-hwloc-compress-dir.sh.am
59 touch utils
/hwloc
/test-hwloc-diffpatch.sh.am
60 touch utils
/hwloc
/test-hwloc-distances.sh.am
61 touch utils
/hwloc
/test-hwloc-distrib.sh.am
62 touch utils
/hwloc
/test-hwloc-info.sh.am
63 touch utils
/hwloc
/test-fake-plugin.sh.am
64 touch utils
/lstopo
/test-hwloc-ls.sh.am
68 echo "Done. Please review the git history to see if there are any patches that should be cherry-picked and squashed."