Checks that various prerequisites for this script are satisfied.
()
| 44 | |
| 45 | |
| 46 | def CheckPrereqs(): |
| 47 | """Checks that various prerequisites for this script are satisfied.""" |
| 48 | logging.info('entering ...') |
| 49 | |
| 50 | if platform.system() != 'Linux' and platform.system() != 'Darwin': |
| 51 | Die('Sorry, this script assumes Linux or Mac OS X thus far. ' |
| 52 | 'Please feel free to edit the source and fix it to your needs.') |
| 53 | |
| 54 | # Ensure source files are available. |
| 55 | for f in ['webui.js', 'index.html', |
| 56 | 'logo-blue.svg', 'package.json']: |
| 57 | if not os.path.exists(f): |
| 58 | Die('%s not found. Must run in amp_validator source directory.' % f) |
| 59 | |
| 60 | |
| 61 | def SetupOutDir(out_dir): |