Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d725152 authored by Jooyung Han's avatar Jooyung Han
Browse files

Support .(dot) files in root

When .(dot) file/dir is added to the rootdir, it works with normal `m
systemimage` build, but fails when building the images with target
files because the copy command misses .(dot) files.

When packaging, need to copy the whole content from the src directory.
This also matches the condition `ls -A` (which means, we care about dot
files as well).

Bug: 292438323
Test: m dist (aosp_cf_x86_64_phone-userdebug)
Change-Id: Ib3f555305c915d499448c2064e5639a641b2ddb7
parent 36c61907
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5733,11 +5733,11 @@ $(BUILT_TARGET_FILES_DIR): intermediates := $(intermediates)

# $(1): Directory to copy
# $(2): Location to copy it to
# The "ls -A" is to prevent "acp s/* d" from failing if s is empty.
# The "ls -A" is to skip if $(1) is empty.
define package_files-copy-root
  if [ -d "$(strip $(1))" -a "$$(ls -A $(1))" ]; then \
    mkdir -p $(2) && \
    $(ACP) -rd $(strip $(1))/* $(2); \
    $(ACP) -rd $(strip $(1))/. $(strip $(2))/; \
  fi
endef