Main entry point.
()
| 138 | |
| 139 | |
| 140 | def main(): |
| 141 | """Main entry point.""" |
| 142 | |
| 143 | if len(sys.argv) <= 1: |
| 144 | print(__doc__) |
| 145 | sys.exit(1) |
| 146 | |
| 147 | setup_options(docopt.docopt(__doc__)) |
| 148 | |
| 149 | if Options.build_cef: |
| 150 | if not sys.version_info[:2] == (2, 7): |
| 151 | print("ERROR: To build CEF from sources you need Python 2.7.") |
| 152 | print(" Upstream automate-git.py works only with that") |
| 153 | print(" version of python.") |
| 154 | sys.exit(1) |
| 155 | build_cef() |
| 156 | elif Options.prebuilt_cef: |
| 157 | prebuilt_cef() |
| 158 | elif Options.make_distrib: |
| 159 | run_make_distrib() |
| 160 | |
| 161 | |
| 162 | def setup_options(docopt_args): |
no test coverage detected