From a0d00c9cdee85d403943e990bad6a8064cf8160b Mon Sep 17 00:00:00 2001 From: Divarion-D Date: Sun, 12 Oct 2025 17:41:45 +0300 Subject: [PATCH] Fixed lb_update generation --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 48d4421..4da1550 100644 --- a/Makefile +++ b/Makefile @@ -111,13 +111,23 @@ lb_update_copy_files: @mkdir -p $(DIST_DIR) @mkdir -p $(TEMP_DIR) - @echo "[INFO] Copying modified or added files from 'src/'..." + @echo "[INFO] Copying modified or added files from 'src/' that are in LB_FILES..." @for file in $$(git diff --name-status $(LAST_TAG)..HEAD | grep -E '^[AM]' | cut -f2 | grep '^src/'); do \ rel_path=$$(echo "$$file" | sed 's|^src/||'); \ - if [ -f "$$file" ]; then \ + # Check if the file belongs to one of the allowed directories LB_FILES \ + allowed=0; \ + for lb_item in $(LB_FILES); do \ + if echo "$$rel_path" | grep -q "^$$lb_item/"; then \ + allowed=1; \ + break; \ + fi; \ + done; \ + if [ "$$allowed" -eq 1 ] && [ -f "$$file" ]; then \ echo "[COPY] $$file -> $(TEMP_DIR)/$$rel_path"; \ mkdir -p "$(TEMP_DIR)/$$(dirname $$rel_path)"; \ cp "$$file" "$(TEMP_DIR)/$$rel_path"; \ + else \ + echo "[SKIP] $$file (not in LB_FILES)"; \ fi \ done