#!/bin/bash

cat <<eof >job.kumac
exec huygens#gen count=100000000 sradius=1e-3
h/file 0 huygens$1.hbook ! n
hrout 0
exit
eof

export PATH=`pwd`/bin:$PATH
./pawX11 -b job.kumac
retcode=$?

# now move any files to be saved back out of the sandbox
mv *.hbook ..

# return with success (=0) or failure (!=0)
exit $retcode
