mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-04-11 23:48:27 +00:00
Fixed lb_update generation
This commit is contained in:
14
Makefile
14
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user