| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | """ |
| 4 | lbugz: execute bugz from the git repository. |
| 5 | |
| 6 | This script is primarily used to test pybugz. |
| 7 | It works by prepending the directory it is located in to sys.path then |
| 8 | importing pybugz and running the main function from that directory. |
| 9 | |
| 10 | This is based on a patch from Mike Frysinger <[email protected]>. |
| 11 | """ |
| 12 | |
| 13 | import os |
| 14 | import sys |
| 15 | |
| 16 | sys.path.insert(0, os.path.dirname(__file__)) |
| 17 | |
| 18 | from bugz.cli import main |
| 19 | |
| 20 | if __name__ == "__main__": |
| 21 | main() |