summaryrefslogtreecommitdiff
path: root/win/sign.py
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2012-02-21 15:53:40 +0100
commit349cfa7acb95abe865209a28e417ec74b56f9bba (patch)
treead65334821b587c4ecdd461be84c94305ffdb888 /win/sign.py
Imported Upstream version 2.2.1upstream/2.2.1
Diffstat (limited to 'win/sign.py')
-rw-r--r--win/sign.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/win/sign.py b/win/sign.py
new file mode 100644
index 0000000..67d1cbc
--- /dev/null
+++ b/win/sign.py
@@ -0,0 +1,19 @@
+import sys
+from wb import config, choose_arch, home_fn
+
+if 'SIGNTOOL' in config:
+ sys.path.append(home_fn(config['SIGNTOOL']))
+
+def main(conf, arch):
+ from signtool import SignTool
+ st = SignTool(conf)
+ for x64 in choose_arch(arch):
+ st.sign_verify(x64=x64)
+
+# if we are run directly, and not loaded as a module
+if __name__ == "__main__":
+ if len(sys.argv) >= 2:
+ main(config, sys.argv[1])
+ else:
+ print "usage: sign <x64|x86|all>"
+ sys.exit(2)