Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / installer / linux / flock_make_package.py
blob8dfc0899d8edd93fd21c480e59db2b069312452d
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # Linux package generation is serialized because it creates large numbers of
6 # temporary files that can overload the /tmp partition on the builders.
7 # See https://codereview.chromium.org/243019
9 # This script does a flock to serialize, and then runs the given shell
10 # script with the given parameters.
12 # Usage:
13 # flock_make_package.py <lockfile> <shell_script> [<args_to_script>*]
15 import subprocess
16 import sys
18 if len(sys.argv) < 3:
19 print "Incorrect args."
20 sys.exit(1)
21 subprocess.call(["flock", "--", sys.argv[1], "bash"] + sys.argv[2:])