OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
share
/
cmake-3.26
/
Modules
/
ExternalProject
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/04/2023 07:10:49 PM
rwxr-xr-x
📄
RepositoryInfo.txt.in
303 bytes
04/04/2023 07:07:49 PM
rw-r--r--
📄
cfgcmd.txt.in
12 bytes
04/04/2023 07:07:49 PM
rw-r--r--
📄
download.cmake.in
4.07 KB
04/04/2023 07:07:49 PM
rw-r--r--
📄
extractfile.cmake.in
1.68 KB
04/04/2023 07:07:49 PM
rw-r--r--
📄
gitclone.cmake.in
2.19 KB
04/04/2023 07:07:49 PM
rw-r--r--
📄
gitupdate.cmake.in
9.93 KB
04/04/2023 07:07:49 PM
rw-r--r--
📄
hgclone.cmake.in
1.36 KB
04/04/2023 07:07:49 PM
rw-r--r--
📄
mkdirs.cmake.in
558 bytes
04/04/2023 07:07:49 PM
rw-r--r--
📄
verify.cmake.in
904 bytes
04/04/2023 07:07:49 PM
rw-r--r--
Editing: extractfile.cmake.in
Close
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. cmake_minimum_required(VERSION 3.5) # Make file names absolute: # get_filename_component(filename "@filename@" ABSOLUTE) get_filename_component(directory "@directory@" ABSOLUTE) message(STATUS "extracting... src='${filename}' dst='${directory}'" ) if(NOT EXISTS "${filename}") message(FATAL_ERROR "File to extract does not exist: '${filename}'") endif() # Prepare a space for extracting: # set(i 1234) while(EXISTS "${directory}/../ex-@name@${i}") math(EXPR i "${i} + 1") endwhile() set(ut_dir "${directory}/../ex-@name@${i}") file(MAKE_DIRECTORY "${ut_dir}") # Extract it: # message(STATUS "extracting... [tar @args@]") execute_process(COMMAND ${CMAKE_COMMAND} -E tar @args@ ${filename} @options@ WORKING_DIRECTORY ${ut_dir} RESULT_VARIABLE rv ) if(NOT rv EQUAL 0) message(STATUS "extracting... [error clean up]") file(REMOVE_RECURSE "${ut_dir}") message(FATAL_ERROR "Extract of '${filename}' failed") endif() # Analyze what came out of the tar file: # message(STATUS "extracting... [analysis]") file(GLOB contents "${ut_dir}/*") list(REMOVE_ITEM contents "${ut_dir}/.DS_Store") list(LENGTH contents n) if(NOT n EQUAL 1 OR NOT IS_DIRECTORY "${contents}") set(contents "${ut_dir}") endif() # Move "the one" directory to the final directory: # message(STATUS "extracting... [rename]") file(REMOVE_RECURSE ${directory}) get_filename_component(contents ${contents} ABSOLUTE) file(RENAME ${contents} ${directory}) # Clean up: # message(STATUS "extracting... [clean up]") file(REMOVE_RECURSE "${ut_dir}") message(STATUS "extracting... done")