1if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1 2# 3# Copyright (c) 2013 Devin Teske 4# All Rights Reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.sbin/bsdconfig/share/packages/packages.subr 251354 2013-06-04 00:35:57Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." "$0" 34f_include $BSDCFG_SHARE/dialog.subr 35f_include $BSDCFG_SHARE/strings.subr --- 47 unchanged lines hidden (view full) --- 83 f_str2varname "$cat" varcat 84 85 # Add number of installed packages for this category (if any) 86 n=0 87 case "$cat" in 88 "$msg_all") debug= f_getvar "_All_ninstalled" n ;; 89 *) debug= f_getvar "_${varcat}_ninstalled" n ;; 90 esac && |
91 [ $n -ge 1 ] && desc="$desc; $n $msg_installed_lc" |
92 93 # Add number of selected packages for this category (if any) 94 n=0 95 case "$cat" in 96 "$msg_all") debug= f_getvar "_All_nselected" n ;; 97 *) debug= f_getvar "_${varcat}_nselected" n ;; 98 esac && |
99 [ $n -ge 1 ] && desc="$desc; $n $msg_selected" |
100 |
101 # Re-Add asterisk to the category if its index has been cached |
102 f_isset _index_page_${varcat}_1 && cat="$cat*" 103 104 # Update buffer with modified elements 105 menu_buf="$menu_buf 106 '$cat' '$desc' '$help'" # End-Quote 107 done 108 setvar "$var_to_set" "$menu_buf" # return our buffer 109} --- 674 unchanged lines hidden --- |