#!/bin/bash #set -x D2U=/home/b/beyond-the-illusion.com/bin/d2ufile NOSTRIP=0 if [ "$1" = "-n" ]; then NOSTRIP=1 shift fi FILE1=$1 tr_file() { FILE1=$1 if [ -d ${FILE1} ]; then chown mystik.staff ${FILE1} chmod 775 ${FILE1} exit 0 fi FILE2=$(echo ${FILE1} | tr '[A-Z]' '[a-z]') if [ ${FILE1} != ${FILE2} ]; then mv -fi ${FILE1} ${FILE2} fi if [ ${NOSTRIP} -ne 1 ]; then ${D2U} ${FILE2} fi chown mystik.staff ${FILE2} chmod 664 ${FILE2} } for i in *; do if [ "$i" != "trfile.t" ]; then tr_file $i fi done