summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.STGZ_Header.sh.in
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-01 18:23:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-01 18:23:15 (GMT)
commita8bb20dce51bba260f171c7f7193119aa6817990 (patch)
tree6dd29078e7a6fcf128f86792015c7d9a14041d1a /Modules/CPack.STGZ_Header.sh.in
parent689a4e4e12e0f38bf3e2c76eb6e53a8b2e956b09 (diff)
downloadCMake-a8bb20dce51bba260f171c7f7193119aa6817990.zip
CMake-a8bb20dce51bba260f171c7f7193119aa6817990.tar.gz
CMake-a8bb20dce51bba260f171c7f7193119aa6817990.tar.bz2
ENH: Add license and make it more verbose
Diffstat (limited to 'Modules/CPack.STGZ_Header.sh.in')
-rwxr-xr-xModules/CPack.STGZ_Header.sh.in52
1 files changed, 44 insertions, 8 deletions
diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in
index 24f0428..0a0104e 100755
--- a/Modules/CPack.STGZ_Header.sh.in
+++ b/Modules/CPack.STGZ_Header.sh.in
@@ -26,7 +26,9 @@ cpack_fix_slashes ()
echo "$1" | sed 's/\\/\//g'
}
-
+interactive=TRUE
+cpack_skip_license=FALSE
+cpack_include_subdir=""
for a in "$@CPACK_AT_SIGN@"; do
if echo $a | grep "^--prefix=" > /dev/null 2> /dev/null; then
cpack_prefix_dir=`echo $a | sed "s/^--prefix=//"`
@@ -45,8 +47,16 @@ for a in "$@CPACK_AT_SIGN@"; do
if echo $a | grep "^--exclude-subdir" > /dev/null 2> /dev/null; then
cpack_include_subdir=FALSE
fi
+ if echo $a | grep "^--skip-license" > /dev/null 2> /dev/null; then
+ cpack_skip_license=TRUE
+ fi
done
+if [ "x${cpack_include_subdir}x" != "xx" -o "x${cpack_skip_license}x" == "xTRUEx" ]
+then
+ interactive=FALSE
+fi
+
cpack_version
echo "This is a self-extracting archive."
toplevel="`pwd`"
@@ -56,16 +66,40 @@ then
fi
echo "The archive will be extracted to: ${toplevel}"
-echo ""
-if [ "x${cpack_include_subdir}x" == "xx" ]
+if [ "x${interactive}x" == "xTRUEx" ]
then
+ echo ""
echo "If you want to stop extracting, please press <ctrl-C>."
- echo "Include the subdirectory @CPACK_PACKAGE_FILE_NAME@" [Yn]:
- read line
- if [ "x${line}x" != "xnx" -a "x${line}x" != "xNx" ]
+
+ if [ "x${cpack_skip_license}x" != "xTRUEx" ]
then
- cpack_include_subdir=TRUE
+ more << ____cpack__here_doc____
+@CPACK_RESOURCE_FILE_LICENSE_CONTENT@
+____cpack__here_doc____
+ echo
+ echo "Do you accept the license? [Yn]: "
+ read line leftover
+ case ${line} in
+ y* | Y*)
+ cpack_license_accepted=TRUE;;
+ *)
+ echo "License not accepted. Exiting ..."
+ exit 1;;
+ esac
+ fi
+
+ if [ "x${cpack_include_subdir}x" == "xx" ]
+ then
+ echo "By default the @CPACK_PACKAGE_NAME@ will be installed in:"
+ echo " \"${toplevel}\""
+ echo "Do you want to include the subdirectory @CPACK_PACKAGE_FILE_NAME@?"
+ echo "Install in: \"${toplevel}/@CPACK_PACKAGE_FILE_NAME@\" [Yn]: "
+ read line leftover
+ case ${line} in
+ y* | Y*)
+ cpack_include_subdir=TRUE
+ esac
fi
fi
@@ -74,7 +108,9 @@ then
toplevel="${toplevel}/@CPACK_PACKAGE_FILE_NAME@"
mkdir -p "${toplevel}"
fi
-echo "Extracting... Please wait..."
+echo
+echo "Using target directory: ${toplevel}"
+echo "Extracting, please wait..."
echo ""
# take the archive portion of this file and pipe it to tar