#! /bin/csh -f # Last edited on 2008-02-04 20:52:46 by stolfi set usage = "$0 RA..." # Re-generates the images for MC930 animated homework hand-ins. # Arguments are RA numbers of students to process. # For each student, expecs to find the file # ${ra}/main.pov - the student's orignal main POV-ray file. # ${ra}/Makefile - homework-specific "rebuild" Makefile (us. link). # (Re)generates the files # ${ra}/main-0.0000{,-i}.jpg - First frame and icon # ${ra}/main-0.5000{,-i}.jpg - Middle frame and icon # ${ra}/main-1.0000{,-i}.jpg - Last frame and icon # ${ra}/main-m.gif - Animated gif with movie # ${ra}/main-s.jpg - Strip with sample frames # if ( $#argv < 1 ) then echo "usage: ${usage}"; exit 1 endif set ras = ( $* ) set povfile = "main.pov" foreach ra ( ${ras} ) # Ckeck if the POV-ray source exists. # If so, re-build the image if ( -r ${ra}/${povfile} ) then echo "=== (re)building images in ${ra} ====================" ( cd ${ra} && make first middle last strip movie; echo " " ) echo "=== done rebuilding ${ra} ==============================" else echo "${ra}/main.pov does not exist" endif end