#!/bin/sh

# Repair permissions for the RowmoteIREmu remote emulation kext and for the helper apps.  Note that iremu, which loads RowmoteIREmu.kext, does perform validity testing before loading it.

pushd "$1" > /dev/null

chown root:wheel Contents/MacOS/iremu
chmod 4775 Contents/MacOS/iremu

chown -R root:wheel Contents/PlugIns/RowmoteIREmu.kext/
chmod -R 755 Contents/PlugIns/RowmoteIREmu.kext/

chown -R root:wheel Contents/PlugIns/RowmoteIREmu_106.kext/
chmod -R 755 Contents/PlugIns/RowmoteIREmu_106.kext/

echo "Permissions repaired"

popd > /dev/null
