summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-02-04 04:08:54 (GMT)
committerBrad King <brad.king@kitware.com>2003-02-04 04:08:54 (GMT)
commitd1d92f7678abce187dcada134437c9df07ca713d (patch)
tree7667a56fcde85db0899190f5be4f7b1c6b0f4b9e /Utilities
parent8c161e7fe3d400c8164428326953a59143846eba (diff)
downloadCMake-d1d92f7678abce187dcada134437c9df07ca713d.zip
CMake-d1d92f7678abce187dcada134437c9df07ca713d.tar.gz
CMake-d1d92f7678abce187dcada134437c9df07ca713d.tar.bz2
ENH: Improved robustness of remote invocation. Added more documentation.
Diffstat (limited to 'Utilities')
-rwxr-xr-xUtilities/Release/cmake_release.sh59
1 files changed, 44 insertions, 15 deletions
diff --git a/Utilities/Release/cmake_release.sh b/Utilities/Release/cmake_release.sh
index fff3657..8893816 100755
--- a/Utilities/Release/cmake_release.sh
+++ b/Utilities/Release/cmake_release.sh
@@ -19,23 +19,40 @@
#
# CMake UNIX Release Script.
#
+# Run with no arguments for documentation.
+#
-[ -z "$REMOTE" ] && SELF="$0"
-CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
-CVSROOT_GREP=":pserver:anonymous@www.cmake.org:[0-9]*/cvsroot/CMake"
+# Release version number.
TAG="Release-1-6-2"
VERSION="1.6.2"
RELEASE="1"
PREVIOUS_VERSION="1.4.7"
PREVIOUS_RELEASE="1"
+
+# CVSROOT setting used to check out CMake.
+CVSROOT=":pserver:anonymous@www.cmake.org:/cvsroot/CMake"
+CVSROOT_GREP=":pserver:anonymous@www.cmake.org:[0-9]*/cvsroot/CMake"
+
+# CMake release root directory.
RELEASE_ROOT_NAME="CMakeReleaseRoot"
RELEASE_ROOT="${HOME}/${RELEASE_ROOT_NAME}"
+
+# Installation prefix used during tarball creation. Tarballs are
+# relative to the installation prefix and do not include this in their
+# paths.
+PREFIX="/usr/local"
+
+# Directory relative to PREFIX where documentation should be placed.
+DOC_DIR="/doc/cmake"
+
+# No default compiler. The config file must provide it.
CC=""
CXX=""
CFLAGS=""
CXXFLAGS=""
-PREFIX="/usr/local"
-DOC_DIR="/doc/cmake"
+
+# Details of remote invocation.
+[ -z "$REMOTE" ] && SELF="$0"
#-----------------------------------------------------------------------------
usage()
@@ -115,14 +132,18 @@ check_host()
# key authentication and no password.
remote()
{
+ if [ ! -z "$REMOTE" ]; then
+ echo "Cannot do recursive remote calls."
+ return 1
+ fi
check_host "$1" || return 1
shift
- REMOTE_TASK="$@"
+ RTASK="'$1'"; shift; for i in "$@"; do RTASK="${RTASK} '$i'"; done
RESULT=0
echo "------- Running remote task on $HOST. -------" &&
(echo "REMOTE=\"1\"" &&
- echo "TASK=\"${REMOTE_TASK}\"" &&
- cat $SELF) | ssh "$HOST" /bin/sh 2>/dev/null || RESULT=1
+ (echo TASK=\"`(eval echo '${RTASK}') | (sed 's/"/\\\\"/g')`\") &&
+ cat $SELF) | ssh -e none "$HOST" /bin/sh || RESULT=1
echo "-------- Remote task on $HOST done. --------" &&
return $RESULT
}
@@ -647,12 +668,20 @@ osx_install()
) >Logs/osx_install.log 2>&1 || error_log Logs/osx_install.log
}
-if [ -z "$TASK" ]; then
- [ -z "$REMOTE" ] && TASK="$@"
-fi
+#-----------------------------------------------------------------------------
+run()
+{
+ CMD="'$1'"; shift; for i in "$@"; do CMD="${CMD} '$i'"; done
+ eval "$CMD"
+}
-if [ -z "$TASK" ]; then
- TASK="usage"
+# Determine task and evaluate it.
+if [ -z "$TASK" ] && [ -z "$REMOTE" ] ; then
+ if [ -z "$1" ]; then
+ usage
+ else
+ run "$@"
+ fi
+else
+ [ -z "$TASK" ] || eval run "$TASK"
fi
-
-eval $TASK