Correcting misleading variable for deleting obsolete files

This commit is contained in:
yannk 2021-12-30 14:24:37 +01:00
parent ad6d86f82d
commit 3c804ef784

View file

@ -17,17 +17,17 @@ export TEXTURES := $(wildcard $(TEXTURESET_FOLDER)/*)
### RECIPE PART ###
all : previews del_obsolete export
all : del_obsolete export
previews: $(SBSARFILES)
previews: $(SBSARFILES) | subformats
$(MAKE) -f Makefile_previews all
subformats: $(SBSARFILES)
$(MAKE) -f Makefile_subformats all
del_obsolete: $(SBS_DIR)
@ for material in $(TEXTURES); do \
rootname=$$(echo $$material | sed -r 's|$(TEXTURESET_FOLDER)/(.*)_.*|\1|');\
del_obsolete: $(SBS_DIR) | previews
@ for material in $$(ls $(SBSAR_DIR)); do \
rootname=$$(echo $$material | sed -r 's|(.*)\.sbsar|\1|');\
sbs_name=$(SBS_DIR)/$$rootname.sbs ;\
if [ ! -f $$sbs_name ] ;\
then echo "CLEANUP : The corresponding $$sbs_name doesnt exist any more, deleting the corresponding obsolete files :" ;\