diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-05 23:48:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-05 23:48:50 +0000 |
commit | 10b08a0b7e4f0e2ce810bd26d29b459cc7210409 (patch) | |
tree | 36a6290ec253d6601cafa7bf669eff8375de1b00 /bin/filter-bash-environment.py | |
parent | b2fe18e3cdcc40fbb3e5304b2bc9f9fc3de4c58e (diff) | |
download | portage-10b08a0b7e4f0e2ce810bd26d29b459cc7210409.tar.gz portage-10b08a0b7e4f0e2ce810bd26d29b459cc7210409.tar.bz2 portage-10b08a0b7e4f0e2ce810bd26d29b459cc7210409.zip |
Pass a space-separated list of variables into filter-bash-environment.py and
generate the final regex on the python side instead of in bash. Also, properly
anchor the regex so that it actually works.
svn path=/main/trunk/; revision=9443
Diffstat (limited to 'bin/filter-bash-environment.py')
-rwxr-xr-x | bin/filter-bash-environment.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/filter-bash-environment.py b/bin/filter-bash-environment.py index 0a88f710b..c5d5da45e 100755 --- a/bin/filter-bash-environment.py +++ b/bin/filter-bash-environment.py @@ -102,6 +102,7 @@ if __name__ == "__main__": parser.error("Missing required PATTERN argument.") file_in = sys.stdin file_out = sys.stdout + var_pattern = "^(%s)$" % "|".join(args[0].split()) filter_bash_environment( - compile_egrep_pattern(args[0]), file_in, file_out) + compile_egrep_pattern(var_pattern), file_in, file_out) file_out.flush() |