diff options
author | tijl <tijl@FreeBSD.org> | 2016-03-21 22:34:05 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2016-03-21 22:34:05 +0800 |
commit | 0b19822b8c515cac75f91033e3a7abcd7f3ab51f (patch) | |
tree | 1357d46169e9982764842453fa9ad623131dff70 /Mk/bsd.licenses.mk | |
parent | 786875b08a3d2d5ec74aa5834feb607c00a348fc (diff) | |
download | freebsd-ports-gnome-0b19822b8c515cac75f91033e3a7abcd7f3ab51f.tar.gz freebsd-ports-gnome-0b19822b8c515cac75f91033e3a7abcd7f3ab51f.tar.zst freebsd-ports-gnome-0b19822b8c515cac75f91033e3a7abcd7f3ab51f.zip |
Replace the license dialog menu and "View license" screen with one --yesno
dialog. This also folds long lines.
PR: 208180
Approved by: portmgr (mat)
Diffstat (limited to 'Mk/bsd.licenses.mk')
-rw-r--r-- | Mk/bsd.licenses.mk | 14 |
1 files 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} |