pkg/lists: fix the fix (handle no lists too)
cp(1) would get confusing arguments with no files to copy if there are no lists to handle; employ xargs(1) as promised to handle this properly.
This commit is contained in:
parent
eadc204b9e
commit
292caede4e
@ -21,12 +21,12 @@ TARGET := $(BUILDDIR)/$(SUFFIX)
|
||||
all: $(TARGET) $(GLOBAL_DEBUG) $(DOTBASE) copy-lists copy-groups
|
||||
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
|
||||
|
||||
# env | sort -u | grep _LISTS | xargs cp
|
||||
# env | sort -u | grep _LISTS | xargs -r cp -t
|
||||
copy-lists:
|
||||
@cp --parents -at $(TARGET) -- \
|
||||
$(foreach V, \
|
||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||
$(if $(filter environment% file,$(origin $V)),$($V)))
|
||||
@echo $(foreach V, \
|
||||
$(filter %_LISTS,$(sort $(.VARIABLES))), \
|
||||
$(if $(filter environment% file,$(origin $V)),$($V))) \
|
||||
| xargs -r -- cp --parents -at $(TARGET) --
|
||||
|
||||
copy-groups:
|
||||
@if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
|
||||
|
Loading…
Reference in New Issue
Block a user