summaryrefslogtreecommitdiff
path: root/functions/packageslists.sh
diff options
context:
space:
mode:
authorTiago Bortoletto Vaz <tiago@debian-ba.org>2008-04-27 19:16:39 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:33 +0100
commitcd97e1bbb1a0260f2340ac18dbf21da0304284d5 (patch)
tree2ae79287f5ae7e09add266e6d249fc2af621181e /functions/packageslists.sh
parent9f07c8fe6d2afeb1b5b2368681391afd163fde8f (diff)
downloadvyos-live-build-cd97e1bbb1a0260f2340ac18dbf21da0304284d5.tar.gz
vyos-live-build-cd97e1bbb1a0260f2340ac18dbf21da0304284d5.zip
Support list of items for conditionals in package lists
This patch allows giving a list of items for the conditionals in package lists. For example, it's possible to specify some packages for more than one architecture in the same conditional block: package01 #if ARCHITECTURE i386 amd64 package02 package03 #endif package04 where package01 and package04 are available for all architectures, but package02 and package03 are available only for i386 and amd64 architectures.
Diffstat (limited to 'functions/packageslists.sh')
-rwxr-xr-xfunctions/packageslists.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/functions/packageslists.sh b/functions/packageslists.sh
index 5f05a4b36..733e8f2c6 100755
--- a/functions/packageslists.sh
+++ b/functions/packageslists.sh
@@ -49,9 +49,10 @@ Expand_packagelist ()
_LH_NESTED=1
_LH_VAR="$(echo "${_LH_LINE}" | cut -d' ' -f2)"
- _LH_VAL="$(echo "${_LH_LINE}" | cut -d' ' -f3)"
+ _LH_VAL="$(echo "${_LH_LINE}" | cut -d' ' -f3-)"
+ _LH_MATCH="$(echo ${_LH_VAL} |grep "\(^\| \)$(eval "echo \$LH_${_LH_VAR}")\($\| \)")" || true
- if [ -n "${_LH_VAR}" ] && [ "$(eval "echo \$LH_${_LH_VAR}")" != "${_LH_VAL}" ]
+ if [ -n "${_LH_VAR}" ] && [ -z "${_LH_MATCH}" ]
then
_LH_ENABLED=0
fi