summaryrefslogtreecommitdiff
path: root/dotfiles-darwin/launchd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles-darwin/launchd/Makefile')
-rw-r--r--dotfiles-darwin/launchd/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/dotfiles-darwin/launchd/Makefile b/dotfiles-darwin/launchd/Makefile
new file mode 100644
index 0000000..54d7b2a
--- /dev/null
+++ b/dotfiles-darwin/launchd/Makefile
@@ -0,0 +1,8 @@
+export ENV_SH := $(realpath ../bin/env.sh)
+
+all: $(foreach plist, $(wildcard *.plist), ~/Library/LaunchAgents/${plist})
+
+~/Library/LaunchAgents/%.plist: %.plist
+ envsubst < $< >$@
+ -launchctl unload $@ 2>/dev/null
+ launchctl load $@