#!/bin/tcsh

# This is the basic installation script.

# Delete the old version by moving it to the trash bin
/bin/cp -p -R "$1" ~/.Trash
/bin/rm -r "$1";

# Move the new version to the location of the old one
/bin/cp -p -R "$2" "$1";

# Change owner to be the system user and the admin group
# Applies recursively to all files in the application bundle
/usr/sbin/chown -R root:admin "$1";

# Delete the temporary folder containing the new version
/bin/rm -r "$3";
