mirror of https://github.com/Kitware/CMake.git

committed by
Brad King

8 changed files with 121 additions and 13 deletions
-
12Help/manual/cmake.1.rst
-
8Help/release/dev/cmake-e-tar-extract-specific-files.rst
-
59Source/cmSystemTools.cxx
-
6Source/cmSystemTools.h
-
4Source/cmcmd.cxx
-
3Tests/RunCMake/CommandLineTar/RunCMakeTest.cmake
-
14Tests/RunCMake/CommandLineTar/roundtrip.cmake
-
28Tests/RunCMake/CommandLineTar/zip-filtered.cmake
@ -0,0 +1,8 @@ |
|||
cmake-e-tar-extract-specific-files |
|||
---------------------------------- |
|||
|
|||
* The :manual:`cmake(1)` ``-E tar`` tool allow for extract (``-x``) or list |
|||
(``-t``) only specific files or directories. To select pathnames append |
|||
a space-separated list of file names or directories. |
|||
When extracting selected files or directories, you must provide their exact |
|||
pathname, as printed by list (``-t``) |
@ -0,0 +1,28 @@ |
|||
set(OUTPUT_NAME "test.zip") |
|||
|
|||
set(COMPRESSION_FLAGS cvf) |
|||
set(COMPRESSION_OPTIONS --format=zip) |
|||
|
|||
set(DECOMPRESSION_FLAGS xvf) |
|||
set(LIST_ARCHIVE TRUE) |
|||
set(DECOMPRESSION_PATHNAMES |
|||
compress_dir/f1.txt # Decompress only file |
|||
compress_dir/d1 # and whole directory |
|||
) |
|||
|
|||
set(CUSTOM_CHECK_FILES |
|||
"f1.txt" |
|||
"d1/f1.txt" |
|||
) |
|||
|
|||
# This files shouldn't exists |
|||
set(NOT_EXISTING_FILES_CHECK |
|||
"d 2/f1.txt" |
|||
"d + 3/f1.txt" |
|||
"d_4/f1.txt" |
|||
"d-4/f1.txt" |
|||
) |
|||
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake) |
|||
|
|||
check_magic("504b0304" LIMIT 4 HEX) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue