ENH: create script is working
This commit is contained in:
parent
523d9ebeed
commit
1a7a6ccc34
|
@ -44,14 +44,12 @@ macro(remote_command comment command)
|
||||||
endmacro(remote_command)
|
endmacro(remote_command)
|
||||||
|
|
||||||
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
||||||
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake.sh)
|
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake-${HOST}.sh)
|
||||||
execute_process(COMMAND
|
file(READ release_cmake.sh RELEASE_CMAKE_CONTENTS)
|
||||||
scp release_cmake.sh ${HOST}:release_cmake.sh
|
remote_command("Copy release_cmake.sh to sever"
|
||||||
RESULT_VARIABLE result)
|
"echo '${RELEASE_CMAKE_CONTENTS}' > release_cmake-${HOST}.sh")
|
||||||
if(${result} GREATER 0)
|
|
||||||
message(FATAL_ERROR "Error scp release_cmake.sh to ${HOST}:release_cmake.sh")
|
remote_command("Run release script" "sh release_cmake-${HOST}.sh")
|
||||||
endif(${result} GREATER 0)
|
|
||||||
remote_command("Run release script" "sh release_cmake.sh")
|
|
||||||
|
|
||||||
message("copy the .gz file back from the machine")
|
message("copy the .gz file back from the machine")
|
||||||
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
||||||
|
|
|
@ -6,13 +6,13 @@ mkdir ~/CMakeReleaseDirectory
|
||||||
check_exit_value()
|
check_exit_value()
|
||||||
{
|
{
|
||||||
VALUE="$1"
|
VALUE="$1"
|
||||||
if [ "$VALUE" != "0" ]; then
|
if [ "$VALUE" != "0" ]\; then
|
||||||
echo "error in $2"
|
echo "error in $2"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]; then
|
if [ ! -z "@USER_MAKE_RULE_FILE_CONTENTS@" ]\; then
|
||||||
echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
|
echo "@USER_MAKE_RULE_FILE_CONTENTS@" > "@USER_MAKE_RULE_FILE@"
|
||||||
check_exit_value $? "Create User Rule file" || exit 1
|
check_exit_value $? "Create User Rule file" || exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -22,7 +22,7 @@ check_exit_value $? "Remove build tree" || exit 1
|
||||||
mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
mkdir ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build
|
||||||
check_exit_value $? "Create build directory" || exit 1
|
check_exit_value $? "Create build directory" || exit 1
|
||||||
# make sure directory was created
|
# make sure directory was created
|
||||||
if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]; then
|
if [ ! -d ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build ]\; then
|
||||||
echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build"
|
echo "Could not create ~/CMakeReleaseDirectory/@CMAKE_VERSION@-build"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue