blob: 64295d594f609ac672f0395fa3e223532fb4a5c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import sys
import os
import subprocess
if __name__ == '__main__':
pos = sys.argv.index('--')
fname = sys.argv[pos + 1]
cmd = sys.argv[pos + 2:]
with open(fname, 'r') as f:
args = [x.strip() for x in f]
os.remove(fname)
p = subprocess.Popen(cmd + args, shell=False, stderr=sys.stderr, stdout=sys.stdout)
p.communicate()
sys.exit(p.returncode)
|