profile.mk: safer find/grep

Don't go crazy if Dir::Etc::sourceparts/d
gives something strange (e.g., /).
This commit is contained in:
Ivan Zakharyaschev 2018-05-22 21:47:06 +03:00 committed by Michael Shigorin
parent 26cf322550
commit 0ecfb35700

View File

@ -53,8 +53,8 @@ profile/init: distclean
eval `apt-config shell $${APTCONF:+-c=$$APTCONF} \
SOURCELIST Dir::Etc::sourcelist/f \
SOURCEPARTS Dir::Etc::sourceparts/d`; \
find "$$SOURCEPARTS" -name '*.list' \
| xargs egrep -Rhv '^#|^[[:blank:]]*$$' "$$SOURCELIST" \
find -mindepth 1 -maxdepth 1 "$$SOURCEPARTS" -name '*.list' \
| xargs egrep -hv -e '^#|^[[:blank:]]*$$' -- "$$SOURCELIST" \
| tee $(BUILDDIR)/sources.list; \
echo; \
} $(LOG); \