Skip to content

Commit

Permalink
Remove unused LaunchAgent plist file and update link.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
kryota-dev committed Jul 20, 2024
1 parent 81da43b commit 9e94401
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
21 changes: 0 additions & 21 deletions .bin/Library/LaunchAgents/_com.user.brewbundle.plist

This file was deleted.

24 changes: 0 additions & 24 deletions .bin/link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,3 @@ for dotfile in "${SCRIPT_DIR}"/.??* ; do
done

source ~/.zprofile


# This script creates symbolic links in the user's Library/LaunchAgents directory for all files starting with 'com.' in the script's Library/LaunchAgents directory, and then loads each Launch Agent script using 'launchctl load'.
if [ "$(uname)" != "Darwin" ] ; then
echo "Not macOS!"
exit 1
fi

LAUNCH_AGENTS_DIR="$HOME/Library/LaunchAgents"

for file in "${SCRIPT_DIR}/Library/LaunchAgents"/com.* ; do
ln -fnsv "$file" "$LAUNCH_AGENTS_DIR"

filename=$(basename -- "$file")
label="${filename%.*}"
full_path="$LAUNCH_AGENTS_DIR/$filename"

if launchctl list | grep -q "$label"; then
launchctl unload "$full_path"
echo "Unloaded $label"
fi
launchctl load "$full_path"
echo "Loaded $label"
done

0 comments on commit 9e94401

Please sign in to comment.