#!/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

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

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

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

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

file2="Airports_archive.tgz"
pc=$p/$file2
echo t:$file2:`sha1sum $pc | awk '{print $1}'`:`ls $pc -l | awk '{print $5}'`  >> $di

