From df391f061714120b30c9c20edde8bb2e8a3dbb9c Mon Sep 17 00:00:00 2001 From: Tijl Coosemans Date: Mon, 21 Mar 2016 14:34:05 +0000 Subject: [PATCH] Replace the license dialog menu and "View license" screen with one --yesno dialog. This also folds long lines. PR: 208180 Approved by: portmgr (mat) --- Mk/bsd.licenses.mk | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Mk/bsd.licenses.mk b/Mk/bsd.licenses.mk index c498044da8ce..da3f75173610 100644 --- a/Mk/bsd.licenses.mk +++ b/Mk/bsd.licenses.mk @@ -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}