mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Add some comments about the filtering procedure
This commit is contained in:
parent
5883673380
commit
50b02777e5
2 changed files with 5 additions and 0 deletions
|
@ -1,2 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# First we filter out all paths not relating to the stuff we want to filter
|
||||||
|
# After that we take out the paths that we *do* want to keep
|
||||||
grep 'EXCLUDE_PATTERN' | grep --invert-match --fixed-strings 'INCLUDE_PATHS'
|
grep 'EXCLUDE_PATTERN' | grep --invert-match --fixed-strings 'INCLUDE_PATHS'
|
||||||
|
|
|
@ -49,6 +49,9 @@ class CreateBootstrapFilterScripts(Task):
|
||||||
|
|
||||||
sed_i(bootstrap_script, r'BOOTSTRAP_FILES_FILTER_PATH', filter_script)
|
sed_i(bootstrap_script, r'BOOTSTRAP_FILES_FILTER_PATH', filter_script)
|
||||||
|
|
||||||
|
# We exclude with patterns but include with fixed strings
|
||||||
|
# The pattern matching when excluding is needed in order to filter
|
||||||
|
# everything below e.g. /usr/share/locale but not the folder itself
|
||||||
filter_lists = info._minimize_size['bootstrap_filter']
|
filter_lists = info._minimize_size['bootstrap_filter']
|
||||||
exclude_list = '\|'.join(map(lambda p: '.' + p + '.\+', filter_lists['exclude']))
|
exclude_list = '\|'.join(map(lambda p: '.' + p + '.\+', filter_lists['exclude']))
|
||||||
include_list = '\n'.join(map(lambda p: '.' + p, filter_lists['include']))
|
include_list = '\n'.join(map(lambda p: '.' + p, filter_lists['include']))
|
||||||
|
|
Loading…
Add table
Reference in a new issue