#!/bin/bash

if !(type "brew" > /dev/null 2>&1); then
  case ${OSTYPE} in
    darwin*)
      yes ' '| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      ;;
    linux*)
      yes ' '| sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

      test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
      test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
      test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
      test -r ~/.zprofile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.zprofile
      echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
      ;;
  esac
fi

#!/bin/bash

if !(type "brew" > /dev/null 2>&1); then
  case ${OSTYPE} in
    darwin*)
      yes ' '| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
      ;;
    linux*)
      yes ' '| sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

      test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
      test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
      test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
      test -r ~/.zprofile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.zprofile
      echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
      ;;
  esac
fi

Update installation command for homebrew
Update installation command for homebrew
