Introduce pysawsim in the README and add fit_force_histograms.py & friends.
[sawsim.git] / pysawsim / qwait
1 #!/bin/bash
2 #
3 # Wait for a job to finish execution
4
5 JOBID="$1"
6
7 while sleep 3; do
8   STAT=`qstat $JOBID 2>&1 1>/dev/null`
9   UNKOWN=`echo "$STAT" | grep "Unknown Job Id"`
10   if [ -n "$UNKOWN" ]; then
11     exit 0 # job has completed, since qstat doesn't recognize it.
12   fi
13 done
14
15 exit 1