mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
early exit if jdiff or javadoc not found
This commit is contained in:
parent
85ea8bc90d
commit
4b1ba59257
@ -223,7 +223,7 @@ def compare_xml(module, apiname_tag, apiname_cur):
|
|||||||
jdiff.wait()
|
jdiff.wait()
|
||||||
code = jdiff.returncode
|
code = jdiff.returncode
|
||||||
except Exception:
|
except Exception:
|
||||||
printt("Javadoc not found. Exiting...")
|
printt("Error executing javadoc. Exiting...")
|
||||||
exit(1)
|
exit(1)
|
||||||
log.close()
|
log.close()
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ def gen_xml(path, modules, name):
|
|||||||
jdiff = subprocess.Popen(cmd, stdout=log, stderr=log)
|
jdiff = subprocess.Popen(cmd, stdout=log, stderr=log)
|
||||||
jdiff.wait()
|
jdiff.wait()
|
||||||
except Exception:
|
except Exception:
|
||||||
printt("Javadoc not found. Exiting...")
|
printt("Error executing javadoc. Exiting...")
|
||||||
exit(1)
|
exit(1)
|
||||||
log.close()
|
log.close()
|
||||||
print("Generated XML for " + name + " " + module.name)
|
print("Generated XML for " + name + " " + module.name)
|
||||||
@ -860,6 +860,16 @@ def main():
|
|||||||
return 0
|
return 0
|
||||||
printinfo()
|
printinfo()
|
||||||
|
|
||||||
|
# Check if javadoc and jdiff are present.
|
||||||
|
jdiff = fix_path(os.path.abspath("./thirdparty/jdiff/v-custom/jdiff.jar"))
|
||||||
|
if(not os.path.isdir(jdiff)):
|
||||||
|
printt("jdiff not found. Exiting...")
|
||||||
|
return 1
|
||||||
|
try:
|
||||||
|
subprocess.call(["javadoc"], stdout=open(os.devnull, "w"), stderr=subprocess.STDOUT)
|
||||||
|
except Exception:
|
||||||
|
printt("javadoc not found. Exiting...")
|
||||||
|
return 1
|
||||||
# -----------------------------------------------
|
# -----------------------------------------------
|
||||||
# 1) Clone Autopsy, checkout to given tag/commit
|
# 1) Clone Autopsy, checkout to given tag/commit
|
||||||
# 2) Get the modules in the clone and the source
|
# 2) Get the modules in the clone and the source
|
||||||
|
Loading…
x
Reference in New Issue
Block a user