ENH: move from tr to cat since it works from a windows machine and works on the AIX

This commit is contained in:
Bill Hoffman 2006-05-05 13:10:49 -04:00
parent 7477aaa5e8
commit 77e894d8f4
1 changed files with 7 additions and 5 deletions

View File

@ -48,17 +48,19 @@ macro(remote_command comment command)
endif(${result} GREATER 0) endif(${result} GREATER 0)
endmacro(remote_command) endmacro(remote_command)
# set this so configure file will work from script mode
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4) set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
# create the script specific for the given host
configure_file(${SCRIPT_PATH}/release_cmake.sh.in configure_file(${SCRIPT_PATH}/release_cmake.sh.in
release_cmake-${HOST}.sh @ONLY) release_cmake-${HOST}.sh @ONLY)
file(READ release_cmake-${HOST}.sh RELEASE_CMAKE_CONTENTS) # remove any old version of the script
remote_command("remove old release_cmake-${HOST}.sh from server" remote_command("remove old release_cmake-${HOST}.sh from server"
"rm -f release_cmake-${HOST}.sh") "rm -f release_cmake-${HOST}.sh")
# copy the script to the remote host via cat with the
# copy the release script to the remote server via tr to remove any dos # script as input for the execute_process this will translate
# line feed stuff in case this was run on a windows box # the file from dos to unix
remote_command("Copy release_cmake-${HOST}.sh to sever" remote_command("Copy release_cmake-${HOST}.sh to sever"
"tr -d '\\\\015' > release_cmake-${HOST}.sh" release_cmake-${HOST}.sh) "cat > release_cmake-${HOST}.sh" release_cmake-${HOST}.sh)
# now run the script on the remote machine # now run the script on the remote machine
remote_command("Run release script" "${RUN_SHELL} release_cmake-${HOST}.sh") remote_command("Run release script" "${RUN_SHELL} release_cmake-${HOST}.sh")