Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / bin / update / signing.py
blobc0b43ce91536fc02583ff45a876c910d76282ed0
1 from tools import make_complete_mar_name
3 import os
4 import subprocess
5 import path
7 def sign_mar_file(target_dir, config, mar_file, filename_prefix):
8 signed_mar_file = make_complete_mar_name(target_dir, filename_prefix + '_signed')
9 mar_executable = os.environ.get('MAR', 'mar')
10 subprocess.check_call([mar_executable, '-C', path.convert_to_native(target_dir), '-d', path.convert_to_native(config.certificate_path), '-n', config.certificate_name, '-s', path.convert_to_native(mar_file), path.convert_to_native(signed_mar_file)])
12 os.rename(signed_mar_file, mar_file)