#!/bin/bash
#
# Regenerage all the images from the code blocks in the index.html
#

. ../generate_options
../generate_clear

ln -s ../images/balloon.gif .
ln -s ../images/medical.gif .
ln -s ../images/present.gif .
ln -s ../images/shading.gif .
ln -s ../images/recycle.gif .
ln -s ../images/font_[0-9].gif .
ln -s ../images/bg.gif .

../generate_examples

# handle extra gif images
# for gif in  *_[0-9]*.gif
# do
#   [ -f "$gif" ] || continue
#   if [ "$gifsicle" ]; then
#     echo "  Optimizing GIF format of \"$gif\"..."
#     gifsicle -O -b $gif
#   fi
#   chmod -f 644 $gif
# done

# make text file links to the generated directory index files
chmod 644 photo_index*   vid_index*
ln -s photo_index.html      photo_index.html.txt
ln -s photo_index_map.shtml photo_index_map.shtml.txt

../generate_compare
echo "DONE"
