blob: a29706cc8fc0f9eb328123af93e7d876214a7b56 [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
def main(pm_binary, stamp_file, key_file):
if not os.path.exists(key_file):
subprocess.check_call([pm_binary, '-k', key_file, 'genkey'])
with open(stamp_file, 'w') as f:
f.write('OK\n')
return 0
if __name__ == '__main__':
sys.exit(main(*sys.argv[1:]))