#!/bin/sh

INPUTMETHOD="/Library/Input Methods"
PWD=`pwd`

echo "Remove old version"
rm -rf "$INPUTMETHOD/Baram.app"
echo "Copy new version"
cp -r "$PWD/Baram.app" "$INPUTMETHOD"
echo "Install launchd script"
cp "$PWD/kr.or.baram.BaramRemapper.plist" /Library/LaunchAgents
chmod +x "$INPUTMETHOD/Baram.app/Contents/SharedSupport/BaramRemapper.sh"
