Files
homebridge/script/install
2015-09-14 22:53:49 -04:00

16 lines
391 B
Bash
Executable File

#!/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