31c31
< import os, os.path, re, sys
---
> import os, os.path, re, socket, sys
36a37,44
> def nfspath(dir):
> if dir.startswith('/.automount/'):
> dir = '/n/%s' % dir[12:]
> elif not dir.startswith('/n/'):
> dir = '/n/%s%s' % (socket.gethostname().split('.')[0], dir)
> return dir
>
> progpath = nfspath(sys.path[0])
68c76
< rootdir = re.sub(r'^/\.automount/', r'/n/', os.getcwd())
---
> rootdir = nfspath(os.getcwd())
95c103,104
< print 'Checking for outdated files in Link directory'
---
> if verbose:
> print 'Checking for outdated files in Link directory'
159,160c168,169
< print >>sys.stderr, 'Job name: %s' % jobname
< print >>sys.stderr, 'Job directory: %s' % jobdir
---
> print 'Job name: %s' % jobname
> print 'Job directory: %s' % jobdir
168d176
< qsub.onlyecho = onlyecho
170d177
< qsub.verbose = verbose
172a180
> qsub.build(joinpath(progpath, 'job.py'))
174,175c182,190
< qsub.do(joinpath(basedir, 'job.py'))
< print >>sys.stderr, ''
---
> if verbose:
> print 'PBS Command: %s' % qsub.command
>
> if not onlyecho:
> ec = qsub.do()
> if ec == 0:
> print 'PBS Jobid: %s' % qsub.result
> else:
> print 'PBS Failed'