#!/bin/sh

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

# just the rotation of the fullsize images
 
  if [ -d rot ]
  then
   cd rot
   for F in *.jpg 
    do convert -rotate -90 -quality 95 $F ../$F
    touch -r $F ../$F 
   done
   cd ..
  fi 
  index_thumb
#  the images are very large, so index with just thumbnails is created  
  if [ ! -a list.htm ]
   then 
# renaming the output of index_thumb back to list.htm
   mv index.htm list.htm
  fi
  if [ ! -d fullsize ]
   then
    mkdir fullsize
    cd fullsize
    ln -s ../*.jpg ./
    cd ..
  fi

zgv 
# here the user is assumed to press u to create thumbnails 
# and then exit sometimes later
