| 28 | |
| 29 | |
| 30 | def Main(): |
| 31 | build_file = p.join( DIR_OF_THIS_SCRIPT, 'third_party', 'ycmd', 'build.py' ) |
| 32 | |
| 33 | if not p.isfile( build_file ): |
| 34 | sys.exit( |
| 35 | 'File {0} does not exist; you probably forgot to run:\n' |
| 36 | '\tgit submodule update --init --recursive\n'.format( build_file ) ) |
| 37 | |
| 38 | CheckCall( [ sys.executable, build_file ] + sys.argv[ 1: ] ) |
| 39 | |
| 40 | # Remove old YCM libs if present so that YCM can start. |
| 41 | old_libs = ( |
| 42 | glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_core.*' ) ) + |
| 43 | glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_client_support.*' ) ) + |
| 44 | glob.glob( p.join( DIR_OF_OLD_LIBS, '*clang*.*' ) ) ) |
| 45 | for lib in old_libs: |
| 46 | os.remove( lib ) |
| 47 | |
| 48 | |
| 49 | if __name__ == "__main__": |