From 7c4bf13fadacc63702dcb2a83482fb2dc2129099 Mon Sep 17 00:00:00 2001 From: Reuben D'Netto Date: Mon, 20 Jul 2015 19:42:22 +1000 Subject: [PATCH] BUG FIX: Make shell scripts POSIX-compliant See #20 --- fake-toolchain/Unix/cc | 4 ++-- fake-toolchain/Unix/cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fake-toolchain/Unix/cc b/fake-toolchain/Unix/cc index 03e796105b..0d6417386d 100755 --- a/fake-toolchain/Unix/cc +++ b/fake-toolchain/Unix/cc @@ -1,10 +1,10 @@ #!/bin/sh -if [[ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]]; then +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then # Cmake determines compiler properties by compiling a test file, so call clang for this case $YCM_CONFIG_GEN_CC_PASSTHROUGH $@ -elif [ "$@" = "-v" ]; then +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then # Needed to enable clang-specific options for certain build systems (e.g. linux) echo "clang version 3.5.0 (fake toolchain)" diff --git a/fake-toolchain/Unix/cxx b/fake-toolchain/Unix/cxx index 3db8744404..fce6a10b62 100755 --- a/fake-toolchain/Unix/cxx +++ b/fake-toolchain/Unix/cxx @@ -1,10 +1,10 @@ #!/bin/sh -if [[ ! -z "$YCM_CONFIG_GEN_CXX_PASSTHROUGH" ]]; then +if [ ! -z "$YCM_CONFIG_GEN_CC_PASSTHROUGH" ]; then # Cmake determines compiler properties by compiling a test file, so call clang for this case $YCM_CONFIG_GEN_CXX_PASSTHROUGH $@ -elif [ "$@" = "-v" ]; then +elif [ "$1" = "-v" ] || [ "$1" = "--version" ]; then # Needed to enable clang-specific options for certain build systems (e.g. linux) echo "clang version 3.5.0 (fake toolchain)"