#!/bin/bash

CURRENTDATE=`date +"%Y%m%d-%RZ"`

p=$1
di=$p"/.dirindex"

:> $di

echo "version:1" >> $di
echo "path:" >> $di
echo "time:"$CURRENTDATE  >> $di

#Buildings  Details  Orthophotos  Pylons  Roads  Trees
file2="Buildings"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

file2="Details"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

file2="Orthophotos"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

file2="Pylons"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

file2="Roads"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

file2="Trees"
pc=$p/$file2/.dirindex
echo d:$file2:`sha1sum $pc | awk '{print $1}'`  >> $di

