From 2c255c5370833d8f290356207d78da2848988945 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sun, 18 Jan 2015 10:10:23 -0800 Subject: [PATCH] Fixing build on Arch Linux Arch has /usr/bin/python point to python3 because that OS wants to be a unique and special snowflake that breaks backwards compatibility. --- install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c53bfe91..252082a6 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,16 @@ if [[ ! -f "$build_file" ]]; then exit 1 fi -"$build_file" "$@" +command_exists() { + command -v "$1" >/dev/null 2>&1 ; +} + +PYTHON_BINARY=python +if command_exists python2; then + PYTHON_BINARY=python2 +fi + +$PYTHON_BINARY "$build_file" "$@" # Remove old YCM libs if present so that YCM can start. rm -f python/*ycm_core.* &> /dev/null