mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
CPack/STGZ: Require explicit acceptance or refusal of license
To make using the generated STGZ easier, require a specific answer to accepting the license terms. Since more moves down one line when '\n' is entered a user may hold enter to paginate through the document. This change prevents the user from accidentally refusing the license terms by holding enter for too long and having to start over.
This commit is contained in:
@@ -86,15 +86,19 @@ then
|
||||
@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
|
||||
while true
|
||||
do
|
||||
echo "Do you accept the license? [yn]: "
|
||||
read line leftover
|
||||
case ${line} in
|
||||
y* | Y*)
|
||||
cpack_license_accepted=TRUE
|
||||
break;;
|
||||
n* | N* | q* | Q* | e* | E*)
|
||||
echo "License not accepted. Exiting ..."
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "x${cpack_include_subdir}x" = "xx" ]
|
||||
|
||||
Reference in New Issue
Block a user