From 4435c0efc83b8fd0c2cae0a5fe0ce886b794552b Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 5 Jul 2020 01:43:34 +0100 Subject: darwin/bin: Add env.sh This short script defines a few environment variables with launchctl so macOS apps can access them. --- dotfiles-darwin/launchd/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dotfiles-darwin/launchd/Makefile (limited to 'dotfiles-darwin/launchd/Makefile') 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 $@ -- cgit v1.2.3-70-g09d2