aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2012-03-02 10:19:33 +0800
committerMu Qiao <qiaomuf@gentoo.org>2012-03-02 10:19:33 +0800
commit156c4064b36c833ee8080d0b3aa7da1316914c1c (patch)
tree40caa338e13d003a95a40fe935d7327c20303a64 /scripts
parentParser: Allow EOLs in builtin array definition (diff)
downloadlibbash-156c4064b36c833ee8080d0b3aa7da1316914c1c.tar.gz
libbash-156c4064b36c833ee8080d0b3aa7da1316914c1c.tar.bz2
libbash-156c4064b36c833ee8080d0b3aa7da1316914c1c.zip
Walker: allow bash expansions in regular expressions
Diffstat (limited to 'scripts')
-rw-r--r--scripts/var_expansion.bash5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/var_expansion.bash b/scripts/var_expansion.bash
index e78ac8f..4bdcb3e 100644
--- a/scripts/var_expansion.bash
+++ b/scripts/var_expansion.bash
@@ -141,3 +141,8 @@ echo "${search_paths/#/${root}}"
[[ "$(declare -p PYTHON_SANITY_CHECKS_EXECUTED)" != "declare -- PYTHON_SANITY_CHECKS_EXECUTED="* || " ${FUNCNAME[@]:1} " =~ " "(python_set_active_version|python_pkg_setup)" " && -z "${PYTHON_SKIP_SANITY_CHECKS}" ]]
[[ " ${FUNCNAME[@]:1} " =~ " "(python_set_active_version|python_pkg_setup)" " ]]
[[ "$(echo "2p" "${file}")" =~ ^"# Gentoo '".*"' wrapper script generated by python_generate_wrapper_scripts()"$ ]]
+
+PYTHON_DEPEND="2:2.6"
+version_components_group_regex="(2|3|\*)(:([[:digit:]]+\.[[:digit:]]+)?(:([[:digit:]]+\.[[:digit:]]+)?)?)?"
+version_components_groups="${PYTHON_DEPEND}"
+[[ "${version_components_groups}" =~ ^((\!)?[[:alnum:]_-]+\?\ )?${version_components_group_regex}(\ ${version_components_group_regex})?$ ]] && echo true