brew.sh: streamline setting HOMEBREW_{OSX,LINUX}

For uses like this one, `case` is much more compact and easier to read.
This commit is contained in:
Martin Afanasjew 2016-04-06 01:31:03 +02:00
parent 8ab2fb6868
commit 3a99d8093c

View File

@ -58,13 +58,10 @@ then
fi fi
HOMEBREW_SYSTEM="$(uname -s)" HOMEBREW_SYSTEM="$(uname -s)"
if [[ "$HOMEBREW_SYSTEM" = "Darwin" ]] case "$HOMEBREW_SYSTEM" in
then Darwin) HOMEBREW_OSX="1";;
HOMEBREW_OSX="1" Linux) HOMEBREW_LINUX="1";;
elif [[ "$HOMEBREW_SYSTEM" = "Linux" ]] esac
then
HOMEBREW_LINUX="1"
fi
if [[ -z "$HOMEBREW_RUBY_PATH" ]] if [[ -z "$HOMEBREW_RUBY_PATH" ]]
then then