packages.subr (2414e86439f4c53aff73d1afe0453fb48145d9e5) packages.subr (ec65e4f8d0654361df5e97d4de3518edebf76b46)
1if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1
2#
3# Copyright (c) 2013-2016 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:

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

138 SELECTED_PACKAGES="$SELECTED_PACKAGES $package"
139 f_dprintf "Added %s to selection list" "$package"
140 done
141 SELECTED_PACKAGES="${SELECTED_PACKAGES# }" # Trim leading space
142}
143
144# f_package_deselect $package ...
145#
1if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1
2#
3# Copyright (c) 2013-2016 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:

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

138 SELECTED_PACKAGES="$SELECTED_PACKAGES $package"
139 f_dprintf "Added %s to selection list" "$package"
140 done
141 SELECTED_PACKAGES="${SELECTED_PACKAGES# }" # Trim leading space
142}
143
144# f_package_deselect $package ...
145#
146# Remove $package from teh list of tracked/selected packages. If $package is
146# Remove $package from the list of tracked/selected packages. If $package is
147# not being tracked (doesn't appear in $SELECTED_PACKAGES), this function
148# amounts to having no effet.
149#
150f_package_deselect()
151{
152 local package pkgsel
153 while [ $# -gt 1 ]; do
154 local new_list=""

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

182#
183# Calculate number of installed/selected packages for each category listed in
184# $PACKAGE_CATEGORIES (the number of installed packages for $category is stored
185# as $_${varcat}_ninstalled -- where $varcat is the product of `f_str2varname
186# $category varcat' -- and number selected packages as $_${varcat}_nselected).
187# Also calculates the total number of installed/selected packages stored as
188# $_All_ninstalled and $_All_nselected.
189#
147# not being tracked (doesn't appear in $SELECTED_PACKAGES), this function
148# amounts to having no effet.
149#
150f_package_deselect()
151{
152 local package pkgsel
153 while [ $# -gt 1 ]; do
154 local new_list=""

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

182#
183# Calculate number of installed/selected packages for each category listed in
184# $PACKAGE_CATEGORIES (the number of installed packages for $category is stored
185# as $_${varcat}_ninstalled -- where $varcat is the product of `f_str2varname
186# $category varcat' -- and number selected packages as $_${varcat}_nselected).
187# Also calculates the total number of installed/selected packages stored as
188# $_All_ninstalled and $_All_nselected.
189#
190# Calculations are peformed by checking "marks". A "mark" is stored as
190# Calculations are performed by checking "marks". A "mark" is stored as
191# $_mark_$varpkg -- where $varpkg is the product of `f_str2varname $package
192# varpkg'. A mark can be "X" for an installed package, `I' for a package that
193# is marked for installation, "R" for a package that is marked for re-install,
194# and "U" for a package that is marked for uninstallation. If a package mark is
195# NULL or a single space (e.g., " "), the package is considered to be NOT
196# selected (and therefore does not increment the counts calculated herein).
197#
198f_package_calculate_totals()

--- 996 unchanged lines hidden ---
191# $_mark_$varpkg -- where $varpkg is the product of `f_str2varname $package
192# varpkg'. A mark can be "X" for an installed package, `I' for a package that
193# is marked for installation, "R" for a package that is marked for re-install,
194# and "U" for a package that is marked for uninstallation. If a package mark is
195# NULL or a single space (e.g., " "), the package is considered to be NOT
196# selected (and therefore does not increment the counts calculated herein).
197#
198f_package_calculate_totals()

--- 996 unchanged lines hidden ---