#!/bin/sh

PLUGINS_DIR="$HOME/Library/Developer/Xcode/Third-Party Plug-ins"

if [ ! -d "$PLUGINS_DIR" ]
then
  mkdir -p "$PLUGINS_DIR"
fi

rm -rf "$PLUGINS_DIR/CodePilot2.xcplugin"
mv /tmp/CodePilot2.xcplugin "$PLUGINS_DIR"

pkgutil --forget net.macoscope.CodePilot2.pkg

exit 0
