diff options
| author | Shaun Jackman | 2017-11-22 10:58:00 -0800 | 
|---|---|---|
| committer | Shaun Jackman | 2017-11-23 08:55:15 -0800 | 
| commit | 5920c0b2aef955f4aa0538461a79c480364c8835 (patch) | |
| tree | f3338e820c86bfcc646d775bf776353ef50db70b /Library/Homebrew/utils/analytics.sh | |
| parent | 1ff628e20f828a0b1e7093b5f3235d77bd30e488 (diff) | |
| download | brew-5920c0b2aef955f4aa0538461a79c480364c8835.tar.bz2 | |
setup-analytics: Handle missing /proc/.../uuid
Diffstat (limited to 'Library/Homebrew/utils/analytics.sh')
| -rw-r--r-- | Library/Homebrew/utils/analytics.sh | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils/analytics.sh b/Library/Homebrew/utils/analytics.sh index 00527fd9f..2ee43f5e8 100644 --- a/Library/Homebrew/utils/analytics.sh +++ b/Library/Homebrew/utils/analytics.sh @@ -35,12 +35,12 @@ setup-analytics() {    HOMEBREW_ANALYTICS_USER_UUID="$(git config --file="$git_config_file" --get homebrew.analyticsuuid 2>/dev/null)"    if [[ -z "$HOMEBREW_ANALYTICS_USER_UUID" ]]    then -    if [[ -n "$HOMEBREW_LINUX" ]] -    then -      HOMEBREW_ANALYTICS_USER_UUID="$(tr a-f A-F </proc/sys/kernel/random/uuid)" -    elif [[ -n "$HOMEBREW_MACOS" ]] +    if [[ -x /usr/bin/uuidgen ]]      then        HOMEBREW_ANALYTICS_USER_UUID="$(/usr/bin/uuidgen)" +    elif [[ -r /proc/sys/kernel/random/uuid ]] +    then +      HOMEBREW_ANALYTICS_USER_UUID="$(tr a-f A-F </proc/sys/kernel/random/uuid)"      else        HOMEBREW_ANALYTICS_USER_UUID="$(uuidgen)"      fi  | 
