1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-11 13:03:46 -05:00

Don't check $(uname -s) twice

This commit is contained in:
Yamashita Yuu
2014-01-08 10:56:43 +09:00
parent 71a916faf2
commit 0e3e603429

View File

@@ -938,11 +938,9 @@ has_broken_mac_readline() {
# https://github.com/yyuu/pyenv/issues/23 # https://github.com/yyuu/pyenv/issues/23
local retval=1 local retval=1
local conftest="$BUILD_PATH/has_broken_mac_readline.h" local conftest="$BUILD_PATH/has_broken_mac_readline.h"
if [ "$(uname -s)" = "Darwin" ]; then
echo "#include <readline/rlconf.h>" > "$conftest" echo "#include <readline/rlconf.h>" > "$conftest"
"${CPP:-cpp}" $CPPFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0 "${CPP:-cpp}" $CPPFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
rm -f "$conftest" rm -f "$conftest"
fi
return "$retval" return "$retval"
else else
return 1 return 1