#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG					#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2014 Christopher Bratusek		#
#							#
#########################################################

if [[ $1 == --help || $1 == -h ]]; then
	$SH_CMD --help
	exit 0
fi

for path in "$@"; do
    test "${path:0:1}" == - && SHO+="$path " && continue
    for try in "$path" "${path%/*}" "$(dirname ${path})"; do
	test -e "$try"/.dirinfo || continue
	grep -q NoShred "$try"/.dirinfo || continue
	echo "can not shred $path -- it's protected!"
	continue 2
    done
    $SH_CMD $SH_OPTS $SHO "$path"
done

unset SHO
