#!/bin/bash


function deleteVTI
{
directory=$1/$2
echo "directory of $directory"
if [ $2 == "_vti_cnf" ]; then
	echo "about to delete $directory"
	rm -fr $directory
else
	
    for f in $( ls $directory ); do

	file=$directory/$f
	if  [ -d $file ];  then
	 
           deleteVTI $directory $f
        fi
    done 
fi
}




arg=("$@")

    if [ $# -eq 1 ]; then
	    echo "begin: $1"	
	if [ -d $1 ]; then
	    echo "begin: $1"
	    for d in $( ls $1 ); do
		dir=$1/$d
		if [ -d $dir ]; then
		   
		    deleteVTI $1 $d
	
		fi
	    done	    
	  
	fi
	
    fi 
