#!/bin/sh

echo "Starting script for moving the summaries to the pagerank_summaries folder"

folder=$PWD
target=pagerank_summaries
target_compressed=pagerank_compressed
for entry in "$folder"/*
do
	FILE="$entry"/pagerank.undirected.summary.txt
  if [ -f "$FILE" ]; then
  	echo "Copying files from: $entry"
		file_name=$(basename $entry)
		cp "$entry"/pagerank.undirected.summary.txt "$target"/"$file_name"_pagerank.undirected.summary.txt
		cp "$entry"/pagerank.undirected.tsv.gz "$target_compressed"/"$file_name"_pagerank.undirected.tsv.gz
	fi
done


