From 32f6a37c79eeca116302b57b49f5d6a936a3e28f Mon Sep 17 00:00:00 2001 From: reimannsum Date: Mon, 2 Nov 2015 11:10:06 -0500 Subject: [PATCH] Update process_output.sh Fix issue with files being treated as directories. --- scripts/crons/process_output.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/crons/process_output.sh b/scripts/crons/process_output.sh index 631e28f..dea5784 100644 --- a/scripts/crons/process_output.sh +++ b/scripts/crons/process_output.sh @@ -7,10 +7,12 @@ cd ~/mtgencode/cards for folder in $(ls); do for sub in ${ ls ${folder} };do + if [ ! -d $folder/$sub ]; then + continue if [ ! -e $folder/$sub/summary.txt ]; then ./scritps/summarize.py -a -v $folder/$sub/output.txt > summary.txt fi - if [ ! -e $folder/$sub/cards.txt ]; then + if [ ! -e $folder/$sub/cards.txt ]; then .decode.py -v -f $folder/$sub/output.txt $folder/$sub/cards.txt fi done