File size: 510 Bytes
25cb3f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#!/usr/bin/env python
from jug import is_jug_running
if is_jug_running():
from sys import argv
from jug.utils import jug_execute
jug_execute(argv[1:])
else:
from sys import argv
from jug.jug import main
try:
# Split and reorder jug's argv from script's argv
argv[:] = ["jug", "execute"] + argv[1:argv.index("--")] + \
[__file__] + argv[argv.index("--"):]
except ValueError:
argv[:] = ["jug", "execute", __file__] + argv[1:]
main(argv)
|