lok: use correct window for the MapMode
[LibreOffice.git] / bin / update / upload_builds.py
blob210668e0d07c8328b8ec053934043fe46a9329d9
1 #! /usr/bin/env python3
3 import sys
4 import os
5 import subprocess
7 from config import parse_config
8 from path import convert_to_unix
10 from tools import replace_variables_in_string
12 def main():
13 product_name = sys.argv[1]
14 buildid = sys.argv[2]
15 platform = sys.argv[3]
16 update_dir = sys.argv[4]
17 update_config = sys.argv[5]
19 config = parse_config(update_config)
20 upload_url = replace_variables_in_string(config.upload_url, channel=config.channel, buildid=buildid, platform=platform)
22 target_url, target_dir = upload_url.split(':')
24 command = "ssh %s 'mkdir -p %s'"%(target_url, target_dir)
25 print(command)
26 subprocess.call(command, shell=True)
27 for file in os.listdir(update_dir):
28 if file.endswith('.mar'):
29 subprocess.call(['scp', convert_to_unix(os.path.join(update_dir, file)), upload_url])
31 if __name__ == '__main__':
32 main()