chiark / gitweb /
Makefile: Add missing quoting for playlist names.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 22 Nov 2024 00:07:13 +0000 (00:07 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 22 Nov 2024 00:07:13 +0000 (00:07 +0000)
Makefile

index 734d60c77ac86863431f2d18cbf7c9608644d3be..cf3ba152a7f9fd01bb9f46a1c649776c73c61d77 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -230,7 +230,7 @@ $(PLS): %.pl: %.epls mkm3u mkm3u.cache-stamp
 CHECKS                  = $(foreach p,$(PLAYLISTS), check/$p)
 check: $(CHECKS)
 $(CHECKS): check/%: %.m3u8
-       $(V_AT)diff -u $< ref/$*.m3u8
+       $(V_AT)diff -u "$<" "ref/$*.m3u8"
 .PHONY: check $(CHECKS)
 
 LINKS                   = $(foreach p,$(PLAYLISTS), link/$p)
@@ -246,7 +246,7 @@ $(LINKS): link/%:
                case $$ok in \
                  t) ;; \
                  *) $(call v-print,LINK,$*); \
-                       ln -frs $*.m3u8 "$$t.new" && mv "$$t.new" "$$t" ;; \
+                       ln -frs "$*.m3u8" "$$t.new" && mv "$$t.new" "$$t" ;; \
                esac
 .PHONY: link $(LINKS)
 
@@ -259,15 +259,17 @@ $(SAVE): save/%: %.m3u8
                ok=nil; \
                if ! [ -f "ref/$*.m3u8" ]; then \
                  $(call v-print,SAVE,$*); \
-                 cp $< ref/$*.m3u8.new && mv ref/$*.m3u8.new ref/$*.m3u8; \
+                 cp "$<" "ref/$*.m3u8.new" && \
+                       mv "ref/$*.m3u8.new" "ref/$*.m3u8"; \
                fi
 .PHONY: save $(SAVE)
 $(FORCE_SAVE): force-save/%: %.m3u8
        $(V_AT) \
                ok=nil; \
-               if ! [ -f "ref/$*.m3u8" ] || ! cmp -s $< ref/$*.m3u8; then \
+               if ! [ -f "ref/$*.m3u8" ] || ! cmp -s $< "ref/$*.m3u8"; then \
                  $(call v-print,SAVE,$*); \
-                 cp $< ref/$*.m3u8.new && mv ref/$*.m3u8.new ref/$*.m3u8; \
+                 cp "$<" "ref/$*.m3u8.new" && \
+                       mv "ref/$*.m3u8.new" "ref/$*.m3u8"; \
                fi
 .PHONY: save $(SAVE)