From: Mark Wooding Date: Fri, 22 Nov 2024 00:07:13 +0000 (+0000) Subject: Makefile: Add missing quoting for playlist names. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/epls/commitdiff_plain/2e3e88be2d9a7a675c176e0e27fe14198208a932 Makefile: Add missing quoting for playlist names. --- diff --git a/Makefile b/Makefile index 734d60c..cf3ba15 100644 --- 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)