diff options
author | Brad King <brad.king@kitware.com> | 2002-08-28 19:08:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-08-28 19:08:18 (GMT) |
commit | 1168d5a85d2e9bf4b74926b1790ded87fd4d5072 (patch) | |
tree | 8236fb0d47a39cfb5a38e18d9fadfa5ded9f531a /Utilities/cmake_release_unix_package.sh | |
parent | d0be2896d7191e56818aaac48f7177b9d92a9693 (diff) | |
download | CMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.zip CMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.tar.gz CMake-1168d5a85d2e9bf4b74926b1790ded87fd4d5072.tar.bz2 |
ENH: Moved build of source tarball to package script.
Diffstat (limited to 'Utilities/cmake_release_unix_package.sh')
-rwxr-xr-x | Utilities/cmake_release_unix_package.sh | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Utilities/cmake_release_unix_package.sh b/Utilities/cmake_release_unix_package.sh index 3fa7e53..832cc3c 100755 --- a/Utilities/cmake_release_unix_package.sh +++ b/Utilities/cmake_release_unix_package.sh @@ -12,8 +12,8 @@ SELFPATH=`cd \`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd` . ${SELFPATH}/cmake_release_unix_config.sh # Cleanup from possible previous run. -rm -rf ${INSTALL_DIR} -mkdir -p ${INSTALL_DIR} +rm -rf ${INSTALL_DIR} ${TARBALL_DIR} +mkdir -p ${INSTALL_DIR} ${TARBALL_DIR} # Run the installation. cd ${BUILD_DIR} @@ -31,6 +31,25 @@ if ${STRIP} ${INSTALL_DIR}${PREFIX}/bin/* \ exit 1 fi +# Make the source tarball if requested. +if test "${CREATE_SOURCE_TARBALL}" = "yes" ; then + TARBALL="${TARBALL_DIR}/${SOURCE_TARBALL_NAME}.tar" + echo "Creating ${SOURCE_TARBALL_NAME}.tar" + if ${TAR} cvf $TARBALL CMake-$VERSION \ + > ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log 2>&1 ; then : ; else + echo "Error, see ${LOG_DIR}/${SOURCE_TARBALL_NAME}.log" + exit 1 + fi + if test "x${GZIP}" != "x" ; then + echo "Creating $TARBALL.gz" + ${GZIP} -c $TARBALL > $TARBALL.gz + fi + if test "x${COMPRESS}" != "x" ; then + echo "Creating $TARBALL.Z" + ${COMPRESS} $TARBALL + fi +fi + # Let the configuration file add some files. CreateExtraFiles @@ -70,7 +89,6 @@ ${FILES} EOF TARBALL="${TARBALL_DIR}/CMake$VERSION-$PLATFORM.tar" -[ -e $TARBALL ] && rm -rf $TARBALL echo "Creating CMake$VERSION-$PLATFORM.tar" if ${TAR} cvf $TARBALL README ${INTERNAL_NAME}.tar \ > ${LOG_DIR}/CMake$VERSION-$PLATFORM.log 2>&1 ; then : ; else @@ -80,12 +98,10 @@ fi if test "x${GZIP}" != "x" ; then echo "Creating $TARBALL.gz" - [ -e $TARBALL.gz ] && rm -rf $TARBALL.gz ${GZIP} -c $TARBALL > $TARBALL.gz fi if test "x${COMPRESS}" != "x" ; then echo "Creating $TARBALL.Z" - [ -e $TARBALL.Z ] && rm -rf $TARBALL.Z ${COMPRESS} $TARBALL fi |