#!/bin/bash

if [[ $EUID > 0 ]]
  then echo "Please run as root (with sudo)"
  exit
fi

echo "Uninstalling main application..."
rm  -rf "/Applications/Pho.to Template Creator.app"
pkgutil --force --forget com.pho.to.pkg.TestTool.main

echo "Uninstalling application-specific Photoshop plugins..."
rm -rf "/Library/Application Support/Adobe/Plug-Ins/CC/PhoToTestToolPsPlugin.8BEM"
rm -rf "/Library/Application Support/Adobe/Plug-Ins/CC/TestTool2JSXHost.8LIZ"
pkgutil --force --forget com.pho.to.pkg.TestTool.plugins

echo "Uninstalling temp files..."
rm  -rf ~/.phototesttool

echo "All done. Please restart Photoshop to finish uninstallation."
