add Scripts to Rule Them All

This commit is contained in:
Jon Maddox
2015-09-14 22:53:49 -04:00
parent 8131f6936e
commit 6f71faf355
6 changed files with 75 additions and 0 deletions

15
script/install Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -e
echo "Installing Homebridge..."
APP_PATH=`pwd`
USER_NAME=`whoami`
cp startup/org.homebridge.plist ~/Library/LaunchAgents/org.homebridge.plist
sed -i '' -e "s#%USER%#$USER_NAME#g" ~/Library/LaunchAgents/org.homebridge.plist
sed -i '' -e "s#%PATH%#$APP_PATH#g" ~/Library/LaunchAgents/org.homebridge.plist
launchctl load -w -F ~/Library/LaunchAgents/org.homebridge.plist