Replace the license dialog menu and "View license" screen with one --yesno

dialog.  This also folds long lines.

PR:		208180
Approved by:	portmgr (mat)
This commit is contained in:
Tijl Coosemans 2016-03-21 14:34:05 +00:00
parent f4261579f3
commit df391f0617
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=411569

View file

@ -611,17 +611,9 @@ ${_LICENSE_COOKIE}:
. if !defined(NO_LICENSES_DIALOGS)
# Dialog interface
. if ${_LICENSE_COMB} == "single"
@trap '${RM} -f $$tmpfile' EXIT INT TERM; \
tmpfile=$$(mktemp -t portlicenses); \
while true; do \
${DIALOG} --menu "License for ${PKGNAME} (${_LICENSE})" 21 70 15 accept "Accept license" reject "Reject license" view "View license" 2>"$${tmpfile}"; \
result=`${CAT} $${tmpfile}`; \
case $${result} in \
accept) break ;; \
reject) exit 1;; \
view) ${DIALOG} --textbox "${_LICENSE_FILE}" 21 75 ;; \
esac; \
done
@${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \
--yes-label Accept --no-label Reject --yesno \
"$$(${CAT} ${_LICENSE_FILE})" 21 76
. elif ${_LICENSE_COMB} == "dual"
@${RM} -f ${_LICENSE_ASK_DATA}