From db8552d10decf0901754660b05b5a9f54260cc33 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 17 Jan 2003 09:52:30 -0500 Subject: ENH: Added support for full remote packaging and copying back to local machine. Added support for uploading to FTP server. --- Utilities/Release/cmake_release.sh | 66 ++++++++++++++++++++++++++++++++++---- 1 file 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" -- cgit v0.12