From 96d4a892284243057262f4369196e713b595e634 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Wed, 3 May 2006 16:24:14 -0400 Subject: ENH: Better output --- Modules/CPack.STGZ_Header.sh.in | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in index 0a0104e..1325239 100755 --- a/Modules/CPack.STGZ_Header.sh.in +++ b/Modules/CPack.STGZ_Header.sh.in @@ -14,6 +14,12 @@ EOF exit 1 } +cpack_echo_exit() +{ + echo $1 + exit 1 +} + # Display version cpack_version() { @@ -92,13 +98,14 @@ ____cpack__here_doc____ if [ "x${cpack_include_subdir}x" == "xx" ] then echo "By default the @CPACK_PACKAGE_NAME@ will be installed in:" - echo " \"${toplevel}\"" + echo " \"${toplevel}/@CPACK_PACKAGE_FILE_NAME@\"" echo "Do you want to include the subdirectory @CPACK_PACKAGE_FILE_NAME@?" - echo "Install in: \"${toplevel}/@CPACK_PACKAGE_FILE_NAME@\" [Yn]: " + echo "Saying no will install in: \"${toplevel}\" [Yn]: " read line leftover + cpack_include_subdir=TRUE case ${line} in - y* | Y*) - cpack_include_subdir=TRUE + n* | N*) + cpack_include_subdir=FALSE esac fi fi @@ -116,7 +123,9 @@ echo "" # take the archive portion of this file and pipe it to tar # the NUMERIC parameter in this command should be one more # than the number of lines in this header file -tail -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) +tail -n +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@" + +echo "Unpacking finished successfully" exit 0 #----------------------------------------------------------- -- cgit v0.12