Last active
August 25, 2016 22:04
-
-
Save micbou/b73b7bb7244511d28b45ed4fc12f9ad5 to your computer and use it in GitHub Desktop.
Update ycm_core library when needed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os.path as p | |
import subprocess | |
import sys | |
DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) | |
DIR_OF_YCMD = p.join( DIR_OF_THIS_SCRIPT, 'third_party', 'ycmd' ) | |
sys.path.insert( 1, DIR_OF_YCMD ) | |
sys.path.insert( 1, p.join( DIR_OF_YCMD, 'ycmd' ) ) | |
import server_utils | |
def Main(): | |
if not server_utils.CompatibleWithCurrentCore(): | |
print( 'The ycm_core library is up to date.' ) | |
sys.exit() | |
build_file = p.join( DIR_OF_THIS_SCRIPT, 'install.py' ) | |
python_binary = sys.executable | |
subprocess.check_call( [ python_binary, build_file ] + sys.argv[1:] ) | |
if __name__ == "__main__": | |
Main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment