#! /bin/csh -f # Last edited on 2001-06-10 14:38:26 by stolfi set usage = "$0 RA..." # Make sure absentees have a gray image file (absent.gif) # and thumbnail (absent-s.gif). # Rejects any submission from absentee students. foreach ra ( $* ) echo "${ra} absent" # Reject any submission: if ( ( -r ${ra}/icon.gif ) && ( ! { cmp ${ra}/icon.gif absent-s.gif } ) ) then /bin/rm -f ${ra}/icon.gif endif set reject = 0 if ( ( -r ${ra}/main.gif ) && ( ! { cmp ${ra}/main.gif absent.gif } ) ) then set reject = 1 endif if ( -r ${ra}/main.pov ) then set reject = 1 endif if ( ${reject} ) then echo "** rejecting submission of ${ra}..." if ( ! ( -d ${ra}/reject ) ) mkdir ${ra}/reject /usr/bin/mv -avi ${ra}/*{.{inc,gif,pov},akefile} ${ra}/reject. endif # Provide the default image for absentees: if ( ( ! -r ${ra}/main.gif ) ) then ( cd ${ra} && ln -s ../absent.gif main.gif ) endif if ( ( ! -r ${ra}/icon.gif ) ) then ( cd ${ra} && ln -s ../absent-s.gif icon.gif ) endif end