Add whatsthere.py to RELEASE-3_2
This commit is contained in:
@ -38,14 +38,14 @@ class Instrument(object):
|
||||
self.full_deployed_hash = None
|
||||
self.full_built_hash = None
|
||||
try:
|
||||
self.full_deployed_hash = repo.commit(self.deployed_hash).hexsha
|
||||
self.full_deployed_hash = repo.commit(self.deployed_hash.split('+')[0]).hexsha
|
||||
for ref in repo.refs:
|
||||
if ref.commit.hexsha == self.full_deployed_hash:
|
||||
self.deployed_refs.append(ref)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
self.full_built_hash = repo.commit(self.built_hash).hexsha
|
||||
self.full_built_hash = repo.commit(self.built_hash.split('+')[0]).hexsha
|
||||
for ref in repo.refs:
|
||||
if ref.commit.hexsha == self.full_built_hash:
|
||||
self.built_refs.append(ref)
|
||||
@ -145,6 +145,7 @@ def main_program():
|
||||
parser.add_argument("-n", "--newserver", action="store_true", help="use newserver instead of server")
|
||||
parser.add_argument("-t", "--test", action="store_true", help="add -test to host")
|
||||
parser.add_argument("-v", "--verbose", action="store_true", help="more output")
|
||||
parser.add_argument("-d", "--directory", default="server", help="use directory instead of server [server]")
|
||||
parser.add_argument("targets", nargs="*", help="select host target")
|
||||
args = parser.parse_args()
|
||||
Test = False
|
||||
@ -161,10 +162,10 @@ def main_program():
|
||||
cmd_list += ["stat --printf=%y" + "\\" * 4 + "n /usr/local/sics/newserver/SICServer"]
|
||||
else:
|
||||
cmd_list = []
|
||||
cmd_list += ["cat /usr/local/sics/server/DEPLOYMENT.TXT"]
|
||||
cmd_list += ["/usr/local/sics/server/SICServer -v"]
|
||||
cmd_list += ["stat --printf=%y" + "\\" * 4 + "n /usr/local/sics/server/SICServer"]
|
||||
|
||||
cmd_list += ["cat /usr/local/sics/%s/DEPLOYMENT.TXT" % args.directory]
|
||||
cmd_list += ["/usr/local/sics/%s/SICServer -v" % args.directory]
|
||||
cmd_list += ["stat --printf=%y" + ("\\" * 4 + "n") + (" /usr/local/sics/%s/SICServer" % args.directory)]
|
||||
|
||||
repo = git.Repo()
|
||||
if len(args.targets) > 0:
|
||||
selected_hosts = []
|
||||
|
Reference in New Issue
Block a user