ENH: create script is working

This commit is contained in:
Bill Hoffman 2006-05-05 10:36:47 -04:00
parent a3c86013d5
commit 25a85c0585
1 changed files with 2 additions and 6 deletions

View File

@ -33,11 +33,7 @@ message("Creating CMake release ${CMAKE_VERSION} on ${HOST} with parallel = ${PR
# define a macro to run a remote command
macro(remote_command comment command)
message("${comment}")
if(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2})
else(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
endif(${ARGC} GREATER 2)
execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result)
if(${result} GREATER 0)
message(FATAL_ERROR "Error running command: ${command}, return value = ${result}")
endif(${result} GREATER 0)
@ -46,7 +42,7 @@ endmacro(remote_command)
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh)
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS)
remote_command("Copy release_cmake.sh to sever"
remote_command("Copy release_cmake-${HOST}.sh to sever"
"echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh")
remote_command("Run release script" "sh release_cmake-${HOST}.sh")