Add helper to determine dependency versions

pull/23/merge
Zach Riggle 10 years ago
parent 99360399e6
commit f27ab04549

@ -0,0 +1,21 @@
import os
import subprocess
file_path = os.path.dirname(__file__)
pwndbg_pwndbg = os.path.abspath(file_path)
pwndbg = os.path.dirname(pwndbg_pwndbg)
capstone = os.path.join(pwndbg, 'capstone')
unicorn = os.path.join(pwndbg, 'unicorn')
def get_hash(directory):
argv = ['git', '-C', directory, 'describe', '--always']
return subprocess.check_output(argv).strip()
hashes = {
'capstone': get_hash(capstone),
'unicorn': get_hash(unicorn),
'pwndbg': get_hash(pwndbg)
}
if __name__ == '__main__':
print(hashes)
Loading…
Cancel
Save