#!/bin/csh -f
if ( $1 == "-render" ) then
# RENDER
render //some/path/foo.${RUSH_PADFRAME}.rib
exit 0
else
# SUBMIT JOB
# Check if we're being submitted by another job..
if ( $?RUSH_ISDAEMON ) then
cat << EOF
****************** WARNING! *********************
Detected an attempt for a job to submit jobs, which unless done properly
can cause a recursive 'network worm'. As a preventative measure, this script
is DUMPING THE PARENT JOB AND KILLING ITSELF to prevent spreading a network worm.
****************** WARNING! *********************
EOF
# DUMP PARENT JOB, COMMIT SUICIDE
rush -dump ; kill -9 $$
exit 1 # unlikely to get here after above..
endif
# Do regular submit here..
rush -submit << EOF
frames 1-10
command $0 -render
cpus +any=10
logdir //server/jobs/logs/ribrender-%s
EOF
if ( $status == 0 ) exit 0
echo 'ERROR: Job failed to submit'
exit 1
endif
|