send.py (1916:fe8d4e92c0a7) | send.py (1948:04aebfd9acf3) |
---|---|
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; --- 82 unchanged lines hidden (view full) --- 91 -v be verbose (list job parameters) 92 93 %(progname)s -h 94 -h display this help 95""" % locals() 96 97try: 98 import getopt | 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; --- 82 unchanged lines hidden (view full) --- 91 -v be verbose (list job parameters) 92 93 %(progname)s -h 94 -h display this help 95""" % locals() 96 97try: 98 import getopt |
99 opts, args = getopt.getopt(sys.argv[1:], '-Ccdefhj:lq:Rt:v') | 99 opts, args = getopt.getopt(sys.argv[1:], '-Ccdefhj:lnq:Rt:v') |
100except getopt.GetoptError: 101 sys.exit(usage) 102 103depend = False 104clean = False 105onlyecho = False 106exprs = [] 107force = False 108listonly = False 109queue = '' 110verbose = False 111jfile = 'Test.py' 112docpts = False 113doruns = True 114runflag = False 115node_type = 'FAST' | 100except getopt.GetoptError: 101 sys.exit(usage) 102 103depend = False 104clean = False 105onlyecho = False 106exprs = [] 107force = False 108listonly = False 109queue = '' 110verbose = False 111jfile = 'Test.py' 112docpts = False 113doruns = True 114runflag = False 115node_type = 'FAST' |
116update = True |
|
116 117for opt,arg in opts: 118 if opt == '-C': 119 docpts = True 120 if opt == '-c': 121 clean = True 122 if opt == '-d': 123 depend = True 124 if opt == '-e': 125 onlyecho = True 126 if opt == '-f': 127 force = True 128 if opt == '-h': 129 print usage 130 sys.exit(0) 131 if opt == '-j': 132 jfile = arg 133 if opt == '-l': 134 listonly = True | 117 118for opt,arg in opts: 119 if opt == '-C': 120 docpts = True 121 if opt == '-c': 122 clean = True 123 if opt == '-d': 124 depend = True 125 if opt == '-e': 126 onlyecho = True 127 if opt == '-f': 128 force = True 129 if opt == '-h': 130 print usage 131 sys.exit(0) 132 if opt == '-j': 133 jfile = arg 134 if opt == '-l': 135 listonly = True |
136 if opt == '-n': 137 update = False |
|
135 if opt == '-q': 136 queue = arg 137 if opt == '-R': 138 runflag = True 139 if opt == '-t': 140 node_type = arg 141 if opt == '-v': 142 verbose = True --- 4 unchanged lines hidden (view full) --- 147for arg in args: 148 exprs.append(re.compile(arg)) 149 150import jobfile, pbs 151from job import JobDir, date 152 153conf = jobfile.JobFile(jfile) 154 | 138 if opt == '-q': 139 queue = arg 140 if opt == '-R': 141 runflag = True 142 if opt == '-t': 143 node_type = arg 144 if opt == '-v': 145 verbose = True --- 4 unchanged lines hidden (view full) --- 150for arg in args: 151 exprs.append(re.compile(arg)) 152 153import jobfile, pbs 154from job import JobDir, date 155 156conf = jobfile.JobFile(jfile) 157 |
155if not listonly and not onlyecho and isdir(conf.linkdir): | 158if update and not listonly and not onlyecho and isdir(conf.linkdir): |
156 if verbose: 157 print 'Checking for outdated files in Link directory' 158 if not isdir(conf.basedir): 159 os.mkdir(conf.basedir) 160 syncdir(conf.linkdir, conf.basedir) 161 162jobnames = {} 163joblist = [] --- 124 unchanged lines hidden --- | 159 if verbose: 160 print 'Checking for outdated files in Link directory' 161 if not isdir(conf.basedir): 162 os.mkdir(conf.basedir) 163 syncdir(conf.linkdir, conf.basedir) 164 165jobnames = {} 166joblist = [] --- 124 unchanged lines hidden --- |