aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Afanasjew2016-04-06 01:31:03 +0200
committerMartin Afanasjew2016-04-07 08:25:41 +0200
commit3a99d8093ca444c1039691387809f914f9a4a17c (patch)
tree1f2531e3dddf708ddb8def50944819823abdbc74 /Library
parent8ab2fb6868497023e369df939690af2a101ecafc (diff)
downloadbrew-3a99d8093ca444c1039691387809f914f9a4a17c.tar.bz2
brew.sh: streamline setting HOMEBREW_{OSX,LINUX}
For uses like this one, `case` is much more compact and easier to read.
Diffstat (limited to 'Library')
-rw-r--r--Library/brew.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/brew.sh b/Library/brew.sh
index 7c5d07bf4..a9a11c368 100644
--- a/Library/brew.sh
+++ b/Library/brew.sh
@@ -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