Use the sed -r option to enable extended regular expressions so that
authorZac Medico <zmedico@gentoo.org>
Thu, 13 Dec 2007 03:54:40 +0000 (03:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 13 Dec 2007 03:54:40 +0000 (03:54 -0000)
commonly used characters like (, ), and + don't have to be escaped.

svn path=/main/trunk/; revision=8893

bin/ebuild.sh

index 5e09daa695d645e080f94f1609748c9cd145b18e..50222eb6e5d8a9f95d7c9400f52166e775d42427 100755 (executable)
@@ -1425,9 +1425,9 @@ filter_readonly_variables() {
        # listed in READONLY_EBUILD_METADATA, since having any readonly attributes
        # persisting in the saved environment can be inconvenient when it
        # eventually needs to be reloaded.
-       "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${var_grep}" | sed \
-               -e 's:^declare[[:space:]]\+-r[[:space:]]\+:declare :' \
-               -e 's:^declare[[:space:]]\+-\([[:alnum:]]*\)r\([[:alnum:]]*\)[[:space:]]\+:declare -\1\2 :'
+       "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${var_grep}" | sed -r \
+               -e 's:^declare[[:space:]]+-r[[:space:]]+:declare :' \
+               -e 's:^declare[[:space:]]+-([[:alnum:]]*)r([[:alnum:]]*)[[:space:]]+:declare -\1\2 :'
 }
 
 # @FUNCTION: preprocess_ebuild_env