1#!/usr/bin/env python 2# Copyright (c) 2005 The Regents of The University of Michigan 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 84 unchanged lines hidden (view full) --- 93 -v be verbose (list job parameters) 94 95 %(progname)s -h 96 -h display this help 97""" % locals() 98 99try: 100 import getopt |
101 opts, args = getopt.getopt(sys.argv[1:], '-Ccdefhj:lnq:Rt:v') |
102except getopt.GetoptError: 103 sys.exit(usage) 104 105depend = False 106clean = False 107onlyecho = False 108exprs = [] 109force = False 110listonly = False 111queue = '' 112verbose = False 113jfile = 'Test.py' 114docpts = False 115doruns = True 116runflag = False 117node_type = 'FAST' |
118update = True |
119 120for opt,arg in opts: 121 if opt == '-C': 122 docpts = True 123 if opt == '-c': 124 clean = True 125 if opt == '-d': 126 depend = True 127 if opt == '-e': 128 onlyecho = True 129 if opt == '-f': 130 force = True 131 if opt == '-h': 132 print usage 133 sys.exit(0) 134 if opt == '-j': 135 jfile = arg 136 if opt == '-l': 137 listonly = True |
138 if opt == '-n': 139 update = False |
140 if opt == '-q': 141 queue = arg 142 if opt == '-R': 143 runflag = True 144 if opt == '-t': 145 node_type = arg 146 if opt == '-v': 147 verbose = True --- 4 unchanged lines hidden (view full) --- 152for arg in args: 153 exprs.append(re.compile(arg)) 154 155import jobfile, pbs 156from job import JobDir, date 157 158conf = jobfile.JobFile(jfile) 159 |
160if update and not listonly and not onlyecho and isdir(conf.linkdir): |
161 if verbose: 162 print 'Checking for outdated files in Link directory' 163 if not isdir(conf.basedir): 164 os.mkdir(conf.basedir) 165 syncdir(conf.linkdir, conf.basedir) 166 167jobnames = {} 168joblist = [] --- 124 unchanged lines hidden --- |