#!/bin/csh -f # make_slideshow_htm_from_slides # ------------------------------------------------------------------------- # Shell script to create a slideshow/index.htm file that shows a slideshow # of all *.htm files in the slideshow subdirectory. Output is written to # stdout, so you may want to redirect it to slideshow/index.htm. Also, # automatically prepends and appends the optional files # prependToSlideshow.htm and appendToSlideshow.htm. # ------------------------------------------------------------------------- # Revision History: # $Log$ # ------------------------------------------------------------------------- # Collect command line options set option_reverse_string = "" while ($#argv > 0) if ("$1" == "-h" || "$1" == "--help") then echo "Usage: $0:t [options] > slideshow/index.htm" echo "Options:" echo " -h = Show this help text" echo " --help = Show this help text" echo " -r = Reverse sort order of slides" echo " --reverse = Reverse sort order of slides" exit 1 else if ("$1" == "-r" || "$1" == "--reverse") then shift set option_reverse_string = "-r" else if ("-" == "`echo $1:q | cut -c 1`") then echo "Error: Invalid option: $1:q" $0 --help exit 1 else # Not a recognized option. Assume it's the first argument break endif end # No arguments defined, so allow none if ($#argv > 0) then $0 -h exit 1 endif ls slideshow/*.htm >& /dev/null if ($status) then echo "No slideshow/*.htm files found. Nothing to do. Aborting..." exit 1 endif # Echo the following lines while expanding dollar sign vars # ?? Add below: cat <
 of  "EOF" make_buttons_for_slideshow # Echo the following lines w/o expanding dollar sign vars, or anything cat <<"EOF"

"EOF" if (-e prependToSlideshow.htm) then cat prependToSlideshow.htm endif # Echo the following lines w/o expanding dollar sign vars, or anything cat <<"EOF"
"EOF" if (-e appendToSlideshow.htm) then cat appendToSlideshow.htm endif # Echo the following lines w/o expanding dollar sign vars, or anything cat <<"EOF"
"EOF"