Skip to content

Commit 9f6e4ee

Browse files
author
Daniele Giunchi
committed
fix problem when pull from data repository
1 parent b507238 commit 9f6e4ee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMake/mafDataTestDownload.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
MACRO (mafDataTestDownload)
22
set(GIT_REPOSITORY "git://github.com/b3c/maf3data.git")
33

4+
if(NOT EXISTS ${MAF_DATA_DIR})
45
execute_process(
56
COMMAND "${GIT_EXECUTABLE}" clone ${GIT_REPOSITORY} ${MAF_DATA_DIR}
67
OUTPUT_VARIABLE _out
78
ERROR_VARIABLE _err
89
RESULT_VARIABLE _res)
10+
else(NOT EXISTS ${MAF_DATA_DIR})
11+
execute_process(
12+
WORKING_DIRECTORY ${MAF_DATA_DIR}
13+
COMMAND "${GIT_EXECUTABLE}" pull
14+
OUTPUT_VARIABLE _out
15+
ERROR_VARIABLE _err
16+
RESULT_VARIABLE _res)
17+
endif(NOT EXISTS ${MAF_DATA_DIR})
18+
919

1020
message(STATUS "out: ${_out}")
1121
message(STATUS "err: ${_err}")

0 commit comments

Comments
 (0)