#!/bin/bash

uploads=/mnt/data1/marionne/public_html/uploads/file_submit/irmmw
dest=/mnt/data1/eas1/octopus/local/irmmw/apps

for i in $uploads/*
do
	upload_tag=$i/.eas1_file_submit_transfer_finished
	if [ -e "$upload_tag" ]
	then
		mv "$i" $dest
	fi
done

chmod -R g+w $dest
chown -R marionne.octopus $dest
