Skip to content

Commit

Permalink
BUG FIX: Make shell scripts POSIX-compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
rdnetto committed Jul 20, 2015
1 parent a8dec30 commit 7c4bf13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fake-toolchain/Unix/cc
Original file line number Diff line number Diff line change
@@ -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)"

Expand Down
4 changes: 2 additions & 2 deletions fake-toolchain/Unix/cxx
Original file line number Diff line number Diff line change
@@ -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)"

Expand Down

0 comments on commit 7c4bf13

Please sign in to comment.