From 1ab01b4caf480d9ec331aa70048b4797e62ce1dc Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 1 Aug 2024 16:46:51 +0100 Subject: [PATCH] Makefile: avoid unnecessary usage of shell --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 21ee4e4..71d2436 100644 --- a/Makefile +++ b/Makefile @@ -18,15 +18,15 @@ publish: blog .PHONY: today today: - mkdir $(shell date '+%Y-%m-%d') + mkdir -p $(shell date '+%Y-%m-%d') .PHONE: draft draft: - mv $(FILE) $(shell dirname $(FILE))/.$(shell basename $(FILE)) + mv "$(FILE)" "$(dir $(FILE)).$(notdir $(FILE))" .PHONE: undraft undraft: - mv $(FILE) $(shell dirname $(FILE))/$(shell echo $(shell basename $(FILE)) | tail -c +2) + mv "$(FILE)" "$(dir $(FILE))$(patsubst .%,%,$(notdir $(FILE)))" .PHONY: clean clean: