#! /bin/sh

# This is the installation script for the trash program.  Any modifications
# should be made in this file.
############################################################################

# This is the default name of your new command
COMMAND="trash"


# The default permissions give execution privelages to all
COMMAND_PERMISSIONS="755"


# This is the default location for the trash directory to be used
# *** IMPORTANT *** If you change the name of this directory, you must 
# also change the name of the directory in the trash.c file to the 
# identical name
TRASH_DIRECTORY="/trash/"


# Directory permissions for the trash bin directory
# This default will be fine, since the program automatically gives only
# the owner of the files permission to do anything with the files
TRASH_PERMISSIONS="777"


# The directory where you would like this new command to reside
COMMAND_DIR="/usr/local/bin/"



#############################################################################
#  DO NOT edit these unless you know what you are doing
#############################################################################

mkdir "$TRASH_DIRECTORY"

chmod "$TRASH_PERMISSIONS" "$TRASH_DIRECTORY"

cc trash.c -o "$COMMAND"

chmod "$COMMAND_PERMISSIONS" "$COMMAND"

mv "$COMMAND" "$COMMAND_DIR"


