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:
parent
8ab2fb6868
commit
3a99d8093c
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user