#!/bin/sh

# gives the original dates to the smaller images 
# generated from the original ones,

# Jenik Hollan, N. Copernicus Observatory and Planetarium in Brno, April 2002

if [ -a fit ]
 then
   for F in *.jpg 
   do  touch -r $F fit/$F 
#  this gives the smaller file the original timestamp
   done
  if [ -d rot ]
  then
   cd rot
   for F in *.jpg 
    do touch -r $F ../fit/$F 
   done
   cd ..
  fi
 cd fit  
if [ -a third ]
 then
   cd third
   for F in *.jpg 
   do  touch -r ../$F $F 
#  this gives the smaller file the original timestamp
   done
if [ -a sixth ]
 then
   cd sixth
   for F in *.jpg 
   do  touch -r ../$F $F 
#  this gives the smaller file the original timestamp
   done
   cd ../..
fi
fi   
 else
  exit 
fi
