#!/bin/bash

# script changes permissions for all results files and directories for domains
# it's necessary to be able delete results by script create_domains.pl if domains are redefined

FOUNDDIRS=`find /data/CASP13/RESULTS/ -name 'T*-D*' -type d `

echo $FOUNDDIRS | xargs --no-run-if-empty chgrp users
echo $FOUNDDIRS | xargs --no-run-if-empty chmod 775

FOUNDFILES=`find /data/CASP13/RESULTS/ -name 'T*-D*' -type f `

echo $FOUNDFILES | xargs --no-run-if-empty chgrp users
echo $FOUNDFILES | xargs --no-run-if-empty chmod 664

exit
