tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / bin / update / signing.py
blobe8546dc83b9ea22cd0422b22ba241194f030eee6
1 from tools import make_complete_mar_name
3 import os
4 import subprocess
5 import path
8 def sign_mar_file(target_dir, certificate_path, certificate_name, mar_file, filename_prefix):
9 signed_mar_file = make_complete_mar_name(target_dir, filename_prefix + '_signed')
10 mar_executable = os.environ.get('MAR', 'mar')
11 subprocess.check_call([mar_executable, '-C', path.convert_to_native(target_dir), '-d',
12 path.convert_to_native(certificate_path), '-n', certificate_name, '-s',
13 path.convert_to_native(mar_file), path.convert_to_native(signed_mar_file)])
15 os.rename(signed_mar_file, mar_file)