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
HOMEBREW_SYSTEM="$(uname -s)"
if [[ "$HOMEBREW_SYSTEM" = "Darwin" ]]
then
HOMEBREW_OSX="1"
elif [[ "$HOMEBREW_SYSTEM" = "Linux" ]]
then
HOMEBREW_LINUX="1"
fi
case "$HOMEBREW_SYSTEM" in
Darwin) HOMEBREW_OSX="1";;
Linux) HOMEBREW_LINUX="1";;
esac
if [[ -z "$HOMEBREW_RUBY_PATH" ]]
then