mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 07:11:29 +02:00
cmake: portable tor/wownerod copies — BSD cp lacks -u (exit 64 evaded the ret==1 check, silently shipping without embedded node/tor); fail on ANY nonzero cp exit
This commit is contained in:
+4
-4
@@ -156,11 +156,11 @@ if(TOR_DIR)
|
||||
if (REPRODUCIBLE)
|
||||
set(TOR_COPY_CMD "cp -a ${TOR_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/tor")
|
||||
else()
|
||||
set(TOR_COPY_CMD "cp -au ${TOR_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/tor")
|
||||
set(TOR_COPY_CMD "cp -a ${TOR_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/tor") # wowlet: BSD cp has no -u (macOS: illegal option, exit 64, silent no-op)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND bash -c "${TOR_COPY_CMD}" RESULT_VARIABLE ret)
|
||||
if(ret EQUAL "1")
|
||||
if(NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Tor copy failure: ${TOR_COPY_CMD}")
|
||||
endif()
|
||||
|
||||
@@ -176,11 +176,11 @@ if(WOWNEROD_DIR)
|
||||
if (REPRODUCIBLE)
|
||||
set(WOWNEROD_COPY_CMD "cp -a ${WOWNEROD_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod")
|
||||
else()
|
||||
set(WOWNEROD_COPY_CMD "cp -au ${WOWNEROD_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod")
|
||||
set(WOWNEROD_COPY_CMD "cp -a ${WOWNEROD_DIR}/* ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/wownerod") # wowlet: BSD cp has no -u
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND bash -c "${WOWNEROD_COPY_CMD}" RESULT_VARIABLE ret)
|
||||
if(ret EQUAL "1")
|
||||
if(NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "wownerod copy failure: ${WOWNEROD_COPY_CMD}")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user