5 # Install brew locally in the project dir. Packages will also be installed here.
6 [ -e "$CI_PROJECT_DIR/.brew" ] || git clone
--depth=1 https
://github.com
/Homebrew
/brew
$CI_PROJECT_DIR/.brew
7 export PATH
="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
9 # make sure to not pollute the machine with temp files etc
10 mkdir
-p $CI_PROJECT_DIR/.brew_cache
11 export HOMEBREW_CACHE
=$CI_PROJECT_DIR/.brew_cache
12 mkdir
-p $CI_PROJECT_DIR/.brew_logs
13 export HOMEBREW_LOGS
=$CI_PROJECT_DIR/.brew_logs
14 mkdir
-p /private
/tmp
/.brew_tmp
15 export HOMEBREW_TEMP
=/private
/tmp
/.brew_tmp
17 # update and install packages
19 brew
install ${1+"$@"}