#!/bin/bash
#
# Script to remove ccrypt integration with GNOME-nautilus GUI environment
# VF - 2004

# User default GNOME-nautilus environment path
NAUTILUS_USER_PATH=$HOME/.gnome2/nautilus-scripts

my_clear()
{
	clear
	echo "ccrypt-gnome2-remove - VF - 2004"
	echo "Script to remove ccrypt integration with GNOME-nautilus GUI environment"
}

# Give some information before proceeding and ask confirmation
my_clear
echo
echo "You are going to delete the following files:"
echo
if [ -f $NAUTILUS_USER_PATH/Encrypt_files ]
then
	echo "$NAUTILUS_USER_PATH/Encrypt_files"
fi
if [ -f $NAUTILUS_USER_PATH/Decrypt_files ]
then
	echo "$NAUTILUS_USER_PATH/Decrypt_files"
fi

read -p "Do you want to proceed(y/n)? " ok
if [ `echo $ok | grep -i y` ]
then
	if [ -f $NAUTILUS_USER_PATH/Encrypt_files ]
	then
		rm -f $NAUTILUS_USER_PATH/Encrypt_files
	fi
	if [ -f $NAUTILUS_USER_PATH/Decrypt_files ]
	then
		rm -f $NAUTILUS_USER_PATH/Decrypt_files 
	fi
else
	exit 1
fi
