Skip to content

Commit

Permalink
added startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Nov 10, 2022
1 parent aba884c commit 9c37467
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/setup_xcreds_autostart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash -e

if [ ! -d "/Library/LaunchAgents" ]; then
mkdir /Library/LaunchAgents
fi

if [ -e "/Library/LaunchAgents/local.xcreds.plist" ]; then
echo "/Library/LaunchAgents/local.xcreds.plist already exists. exiting."
else
/usr/libexec/PlistBuddy -c "Add :Label string local.xcreds" /Library/LaunchAgents/local.xcreds.plist
/usr/libexec/PlistBuddy -c "Add :ProgramArguments array" /Library/LaunchAgents/local.xcreds.plist
/usr/libexec/PlistBuddy -c "Add :ProgramArguments:0 string /Applications/XCreds.app/Contents/MacOS/XCreds" /Library/LaunchAgents/local.xcreds.plist
/usr/libexec/PlistBuddy -c "Add :KeepAlive bool YES" /Library/LaunchAgents/local.xcreds.plist

echo "successfully set up xcreds to launch at login for every user."
fi
Binary file not shown.

0 comments on commit 9c37467

Please sign in to comment.