From abdc8df1d2df5d2527865f765c57566336f48ef7 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sat, 22 Feb 2025 11:05:43 +0000 Subject: darwin/env.plist: Switch to JSON --- dotfiles-darwin/launchd/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dotfiles-darwin/launchd/Makefile') diff --git a/dotfiles-darwin/launchd/Makefile b/dotfiles-darwin/launchd/Makefile index 54d7b2a..cad2e9a 100644 --- a/dotfiles-darwin/launchd/Makefile +++ b/dotfiles-darwin/launchd/Makefile @@ -1,8 +1,9 @@ export ENV_SH := $(realpath ../bin/env.sh) +AGENTS_DIR := ~/Library/LaunchAgents -all: $(foreach plist, $(wildcard *.plist), ~/Library/LaunchAgents/${plist}) +all: $(foreach plist, $(wildcard *.json), $(AGENTS_DIR)/$(plist:json=plist)) -~/Library/LaunchAgents/%.plist: %.plist - envsubst < $< >$@ +$(AGENTS_DIR)/%.plist: %.json + plutil -convert xml1 -o $@ - <<< $$(envsubst < $<) -launchctl unload $@ 2>/dev/null launchctl load $@ -- cgit v1.2.3-70-g09d2