Merge pull request #4271 from hashicorp/build-system-linux-compat

Build system linux compat
This commit is contained in:
Matt Keeler 2018-06-25 11:14:09 -04:00 committed by GitHub
commit 40886b52ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -32,10 +32,8 @@ CONSUL_PKG_NAME="consul"
if test "$(uname)" == "Darwin"
then
SED_EXT="-E"
alias sed_i="sed -i ''"
else
SED_EXT=""
alias sed_i="sed -i"
SED_EXT="-r"
fi
CONSUL_BINARY_TYPE=oss

View File

@ -58,6 +58,17 @@ function debug {
fi
}
function sed_i {
if test "$(uname)" == "Darwin"
then
sed -i '' "$@"
return $?
else
sed -i "$@"
return $?
fi
}
function is_set {
# Arguments:
# $1 - string value to check its truthiness