diff options
Diffstat (limited to 'dotfiles-darwin/launchd/Makefile')
| -rw-r--r-- | dotfiles-darwin/launchd/Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
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 $@ |
