diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-05-03 20:24:14 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-05-03 20:24:14 (GMT) |
commit | 96d4a892284243057262f4369196e713b595e634 (patch) | |
tree | a543512f905d890df1d18a6cc5a0feb2e3a073a0 /Modules/CPack.STGZ_Header.sh.in | |
parent | 00d063a3469146a3b94ec2456ceaf038393c51aa (diff) | |
download | CMake-96d4a892284243057262f4369196e713b595e634.zip CMake-96d4a892284243057262f4369196e713b595e634.tar.gz CMake-96d4a892284243057262f4369196e713b595e634.tar.bz2 |
ENH: Better output
Diffstat (limited to 'Modules/CPack.STGZ_Header.sh.in')
-rwxr-xr-x | Modules/CPack.STGZ_Header.sh.in | 19 |
1 files 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 #----------------------------------------------------------- |