diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-05 16:14:32 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-05-05 16:14:32 (GMT) |
commit | 9f46c81b45221a473c6d1fc9a64cec5fc022f352 (patch) | |
tree | 9ca3446df1548a8ac4dbe6982b41eeb5b9974205 /Utilities/Release/release_cmake.cmake | |
parent | 66d7aef82b1c3019e7a69e2af24835bd49edba53 (diff) | |
download | CMake-9f46c81b45221a473c6d1fc9a64cec5fc022f352.zip CMake-9f46c81b45221a473c6d1fc9a64cec5fc022f352.tar.gz CMake-9f46c81b45221a473c6d1fc9a64cec5fc022f352.tar.bz2 |
ENH: working on hp
Diffstat (limited to 'Utilities/Release/release_cmake.cmake')
-rw-r--r-- | Utilities/Release/release_cmake.cmake | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 66fff95..9882935 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -1,6 +1,9 @@ set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake") get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) +if(NOT DEFINED RUN_SHELL) + set(RUN_SHELL "/bin/sh") +endif(NOT DEFINED RUN_SHELL) if(NOT DEFINED INSTALLER_SUFFIX) set(INSTALLER_SUFFIX "*.sh") endif(NOT DEFINED INSTALLER_SUFFIX) @@ -33,19 +36,26 @@ 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}") - execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) + if(${ARGC} GREATER 2) + message("ssh ${HOST} ${EXTRA_HOP} ${command}") + execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) + else(${ARGC} GREATER 2) + message("ssh ${HOST} ${EXTRA_HOP} ${command}") + execute_process(COMMAND ssh ${HOST} ${EXTRA_HOP} ${command} RESULT_VARIABLE result) + endif(${ARGC} GREATER 2) if(${result} GREATER 0) message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") endif(${result} GREATER 0) endmacro(remote_command) set(CMAKE_BACKWARDS_COMPATIBILITY 2.4) -configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh) +configure_file(${SCRIPT_PATH}/release_cmake.sh.in + release_cmake-${HOST}.sh @ONLY) file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS) remote_command("Copy release_cmake-${HOST}.sh to sever" - "echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh") + "tr -d '\\\\015' > release_cmake-${HOST}.sh" release_cmake-${HOST}.sh) -remote_command("Run release script" "sh release_cmake-${HOST}.sh") +remote_command("Run release script" "${RUN_SHELL} release_cmake-${HOST}.sh") message("copy the .gz file back from the machine") execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz . |