#!/bin/sh

dir=.

echo "Starting script"
for entry in $(find $dir -name "20*" -type d); do
    pr=pagerank_summaries/"$entry"_pagerank.undirected.summary.txt
    count=dump_counts/"$entry"_prop_count.tsv
    compressed=kgtk_compressed_dumps/"$entry".tar.bz2
    sorted="$entry"/edgefile_sorted.tsv
    echo "Assessing $entry ... "
    if [ -f  $sorted ]; then
        echo $'\t' $entry has been sorted.
        if [ -f  $pr ]; then
            echo $'\t' $entry has been processed for page rank.
            if [ -f  $count ]; then
                echo $'\t' $entry  Classes and properties counted. Make sure deltas have been calculated!
                if [ -f  $compressed ]; then
                    echo $'\t' $entry has been compressed.
								else
										echo $'\t' $entry has NOT been compressed. Check if compressed file is deleted.
                fi
								echo "$entry" can be deleted 
            fi
        fi
    fi
    
done
