summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-06-11 16:03:16 +0200
committerDaniel Baumann <daniel@debian.org>2011-06-11 16:03:16 +0200
commit14a3d468dc42fe6088e18dc9deca7fbff557fb97 (patch)
tree3c06a670ef15c01ffa262729242aac7ccf15fb65 /functions
parent9f4b5f3dd026da87b7e69c558276cdf7ff1e8af7 (diff)
downloadvyos-live-build-14a3d468dc42fe6088e18dc9deca7fbff557fb97.tar.gz
vyos-live-build-14a3d468dc42fe6088e18dc9deca7fbff557fb97.zip
Adding support for 'nif' in package lists.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/packagelists.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/functions/packagelists.sh b/functions/packagelists.sh
index 1d6c68142..aeb71f600 100755
--- a/functions/packagelists.sh
+++ b/functions/packagelists.sh
@@ -64,6 +64,30 @@ Expand_packagelist ()
done
;;
+ \#nif\ *)
+ if [ ${_LB_NESTED} -eq 1 ]
+ then
+ echo "E: Nesting conditionals is not supported" >&2
+ exit 1
+ fi
+ _LB_NESTED=1
+
+ _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
+ _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
+
+ _LB_ENABLED=0
+ for _LB_NEEDLE_PART in ${_LB_NEEDLE}
+ do
+ for _LB_HAYSTACK_PART in ${_LB_HAYSTACK}
+ do
+ if [ "${_LB_NEEDLE_PART}" != "${_LB_HAYSTACK_PART}" ]
+ then
+ _LB_ENABLED=1
+ fi
+ done
+ done
+ ;;
+
\#endif*)
_LB_NESTED=0
_LB_ENABLED=1