# /bin/csh -f # Last edited on 2001-06-02 18:48:07 by stolfi set usage = "$0 MM-DD" # Fetches the ".pov" and ".inc" files of all students, # from ~raNNNNNN/public_html/mp004/MM-DD/ to ./NNNNNN, # where NNNNNN is the student's RA number. # Requires a file "ras.txt" with the RA numbers of all students. if ( $#argv != 1 ) then echo "usage" ${usage}"; exit 1 endif set mmdd = "$1"; shift foreach ra ( `cat ras.txt` ) set dir = "${ra}" set usr = "ra${ra}" set exp = ~${usr}/public_html/mp004/${mmdd} if ( ! ( -d ${dir} ) ) mkdir ${dir} if ( ! ( -r ${dir}/Makefile ) ) then ( cd ${dir} && ln -s ../Makefile ) endif if ( -d ${exp} ) then cp -avu ${exp}/*.{pov,inc,gif} $dir/ else echo "** ${exp} not found **" endif end