| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
import os |
| 4 |
import sys |
| 5 |
|
| 6 |
program = '''#!/usr/bin/env python3 |
| 7 |
|
| 8 |
raise SystemExit({}) |
| 9 |
''' |
| 10 |
|
| 11 |
for i, a in enumerate(sys.argv[1:]): |
| 12 |
with open(a, 'w') as f: |
| 13 |
print(program.format(i), file=f) |
| 14 |
os.chmod(a, 0o755) |