diff options
author | Brad King <brad.king@kitware.com> | 2003-01-17 14:52:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-01-17 14:52:30 (GMT) |
commit | db8552d10decf0901754660b05b5a9f54260cc33 (patch) | |
tree | c49fb37e879232763e57a35b8018fdd337cf2de7 /Utilities | |
parent | 911a33ce6d743ce42b038e8b66cc7df80bb796cf (diff) | |
download | CMake-db8552d10decf0901754660b05b5a9f54260cc33.zip CMake-db8552d10decf0901754660b05b5a9f54260cc33.tar.gz CMake-db8552d10decf0901754660b05b5a9f54260cc33.tar.bz2 |
ENH: Added support for full remote packaging and copying back to local machine. Added support for uploading to FTP server.
Diffstat (limited to 'Utilities')
-rwxr-xr-x | Utilities/Release/cmake_release.sh | 66 |
1 files changed, 59 insertions, 7 deletions
diff --git a/Utilities/Release/cmake_release.sh b/Utilities/Release/cmake_release.sh index 17b6381..2a7b41e 100755 --- a/Utilities/Release/cmake_release.sh +++ b/Utilities/Release/cmake_release.sh @@ -53,28 +53,80 @@ error_log() } #----------------------------------------------------------------------------- -remote() +check_host() { HOST="$1" + if [ -z "$HOST" ]; then + echo "Must specify host." + return 1 + fi +} + +#----------------------------------------------------------------------------- +remote() +{ + check_host "$1" || return 1 shift REMOTE_TASK="$@" - echo "------- Running remote task on $HOST. -------" + RESULT=0 + echo "------- Running remote task on $HOST. -------" && (echo "REMOTE=\"1\"" && echo "TASK=\"${REMOTE_TASK}\"" && - cat $SELF) | ssh "$HOST" /bin/sh 2>/dev/null - echo "-------- Remote task on $HOST done. --------" + cat $SELF) | ssh "$HOST" /bin/sh 2>/dev/null || RESULT=1 + echo "-------- Remote task on $HOST done. --------" && + return $RESULT } #----------------------------------------------------------------------------- remote_copy() { - HOST="$1" - echo "------- Copying tarballs from $HOST. -------" - scp "$HOST:${RELEASE_ROOT_NAME}/Tarballs/*" . + check_host "$1" || return 1 + EXPR="$2" + [ ! -z "$EXPR" ] || EXPR="*" + echo "------- Copying tarballs from $HOST. -------" && + scp "$HOST:${RELEASE_ROOT_NAME}/Tarballs/${EXPR}" . && echo "---- Done copying tarballs from $HOST. -----" } #----------------------------------------------------------------------------- +remote_copy_source() +{ + check_host "$1" || return 1 + remote_copy "$HOST" "cmake-${VERSION}.tar*" +} + +#----------------------------------------------------------------------------- +remote_copy_binary() +{ + check_host "$1" || return 1 + remote_copy "$HOST" "cmake-${VERSION}-*" +} + +#----------------------------------------------------------------------------- +remote_source() +{ + check_host "$1" || return 1 + remote "$HOST" source_tarball && + remote_copy_source "$HOST" +} + +#----------------------------------------------------------------------------- +remote_binary() +{ + check_host "$1" || return 1 + remote "$HOST" binary_tarball && + remote_copy_binary "$HOST" +} + +#----------------------------------------------------------------------------- +upload() +{ + echo "------- Copying tarballs to www.cmake.org. -------" + scp cmake-${VERSION}*tar.* www.cmake.org:/projects/FTP/pub/cmake + echo "---- Done copying tarballs to www.cmake.org. -----" +} + +#----------------------------------------------------------------------------- setup() { [ -z "${DONE_setup}" ] || return 0 ; DONE_setup="yes" |