Deleted Added
full compact
index.subr (268999) index.subr (273067)
1if [ ! "$_PACKAGES_INDEX_SUBR" ]; then _PACKAGES_INDEX_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 (INCLUDING, 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#
1if [ ! "$_PACKAGES_INDEX_SUBR" ]; then _PACKAGES_INDEX_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 (INCLUDING, 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/index.subr 268999 2014-07-22 23:10:12Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/share/packages/index.subr 273067 2014-10-14 03:11:46Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." packages/index.subr
34f_include $BSDCFG_SHARE/device.subr
35f_include $BSDCFG_SHARE/media/common.subr

--- 202 unchanged lines hidden (view full) ---

238 export msg_no_description_provided
239 export msg_all msg_all_desc
240 export VALID_VARNAME_CHARS
241 export msg_packages
242
243 eval "$( debug= f_getvar "$var_to_get" | awk -F'|' '
244 function asorti(src, dest)
245 {
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." packages/index.subr
34f_include $BSDCFG_SHARE/device.subr
35f_include $BSDCFG_SHARE/media/common.subr

--- 202 unchanged lines hidden (view full) ---

238 export msg_no_description_provided
239 export msg_all msg_all_desc
240 export VALID_VARNAME_CHARS
241 export msg_packages
242
243 eval "$( debug= f_getvar "$var_to_get" | awk -F'|' '
244 function asorti(src, dest)
245 {
246 k = nitems = 0
247
246 # Copy src indices to dest and calculate array length
248 # Copy src indices to dest and calculate array length
247 nitems = 0; for (i in src) dest[++nitems] = i
249 for (i in src) dest[++nitems] = i
248
249 # Sort the array of indices (dest) using insertion sort method
250 for (i = 1; i <= nitems; k = i++)
251 {
252 idx = dest[i]
253 while ((k > 0) && (dest[k] > idx))
254 {
255 dest[k+1] = dest[k]

--- 157 unchanged lines hidden ---
250
251 # Sort the array of indices (dest) using insertion sort method
252 for (i = 1; i <= nitems; k = i++)
253 {
254 idx = dest[i]
255 while ((k > 0) && (dest[k] > idx))
256 {
257 dest[k+1] = dest[k]

--- 157 unchanged lines hidden ---