Nicholas Bishop | 82a3feb | 2021-06-23 13:18:18 -0400 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
| 2 | # pylint: disable=missing-docstring |
| 3 | |
| 4 | import os |
| 5 | import subprocess |
| 6 | import sys |
| 7 | |
| 8 | |
| 9 | def main(): |
| 10 | repo_dir = os.path.dirname(os.path.realpath(__file__)) |
Nicholas Bishop | 2147fa8 | 2021-06-23 14:27:33 -0400 | [diff] [blame^] | 11 | tools_manifest = os.path.join(repo_dir, 'tools/Cargo.toml') |
Nicholas Bishop | 82a3feb | 2021-06-23 13:18:18 -0400 | [diff] [blame] | 12 | |
Nicholas Bishop | 2147fa8 | 2021-06-23 14:27:33 -0400 | [diff] [blame^] | 13 | cmd = ['cargo', 'run', '--quiet', '--manifest-path', tools_manifest, '--'] |
Nicholas Bishop | 82a3feb | 2021-06-23 13:18:18 -0400 | [diff] [blame] | 14 | cmd += ['--repo', repo_dir] |
| 15 | cmd += sys.argv[1:] |
| 16 | |
Nicholas Bishop | 2147fa8 | 2021-06-23 14:27:33 -0400 | [diff] [blame^] | 17 | subprocess.run(cmd, check=True) |
Nicholas Bishop | 82a3feb | 2021-06-23 13:18:18 -0400 | [diff] [blame] | 18 | |
| 19 | |
| 20 | if __name__ == '__main__': |
| 21 | main() |