#!/bin/csh -f set DIR = /afs/nd.edu/courses/math/math211.01 cat $DIR/NEWS echo 'To submit an assignment,' echo 'you should be in the directory that CONTAINS the files to submit' #set CMD = $0; set CMD = $CMD:t set done = 0 while (! $done) set done = 1 if !( -d $DIR/assignments/$USER/final ) then echo "Directory $DIR/assignments/$USER/final not found" exit(-1) endif set ACL=`fs listacl $DIR/assignments/$USER/final|grep $USER` if ( $ACL[$#ACL] == 'rl' ) then set DUE = (`grep DUE $DIR/final`) shift DUE echo "the final submission directory has been locked" echo "the deadline is 24:00 midnight on $DUE" exit(-1) endif set ASSIGN = (`grep FILES $DIR/final`) shift ASSIGN endif end foreach file ($ASSIGN) if (-f $file) then echo -n "Does $file compile? (y/n) " set FLAG = "$<" if ( $FLAG == 'y') then /bin/cp $file $DIR/assignments/$USER/final echo "$file copied" else /bin/cp $file $DIR/assignments/$USER/final echo "$file copied - you will not receive more than 2 points" echo "if it does not compile. You may resubmit before the deadline." endif else echo "$file not found" endif end