summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-24 19:45:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2017-01-24 19:45:35 (GMT)
commitc59d381065b14076f47246f21ecd730cfdbae7a1 (patch)
tree4cf4d1286af0021411e32c1aa91ba0f5a2a5195d /Modules
parent38bb96386cdc331d6fd080166318ff8272fc19eb (diff)
parent624709c824a2d7a75a36dc23551377bdc2aee648 (diff)
downloadCMake-c59d381065b14076f47246f21ecd730cfdbae7a1.zip
CMake-c59d381065b14076f47246f21ecd730cfdbae7a1.tar.gz
CMake-c59d381065b14076f47246f21ecd730cfdbae7a1.tar.bz2
Merge topic 'cpack-stgz-minimal-test'
624709c8 CPack/STGZ: minimalistic packages test 1c93eb68 CPack/STGZ prefer pax for extraction
Diffstat (limited to 'Modules')
-rwxr-xr-xModules/CPack.STGZ_Header.sh.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index dee576f..c615851 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -130,7 +130,10 @@ echo ""
use_new_tail_syntax="-n"
tail $use_new_tail_syntax +1 "$0" > /dev/null 2> /dev/null || use_new_tail_syntax=""
-tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
+extractor="pax -r"
+command -v pax > /dev/null 2> /dev/null || extractor="tar xf -"
+
+tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && ${extractor}) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@"
echo "Unpacking finished successfully"