mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
21 lines
402 B
Bash
Executable File
21 lines
402 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Installs launchd agents for appropriately.
|
|
|
|
agent="$HOME/Library/LaunchAgents"
|
|
uid="$(id -u "$(whoami)")"
|
|
|
|
test -d "$agent"
|
|
|
|
for file in "$DOTFILES"/macOS/LaunchAgents/*.plist; do
|
|
filename="$(basename $file)"
|
|
path="$agent/$filename"
|
|
if ! test -e "$path"; then
|
|
echo "Installing Agent: $filename"
|
|
cp "$file" "$path"
|
|
launchctl enable "user/$uid/$filename"
|
|
fi
|
|
done
|