`cabal check`: add typed errors (#8269)
[cabal.git] / .gitlab / brew.sh
blobde769632e6fa362e038b6092099a78ad37fd04ea
1 #!/usr/bin/env bash
3 set -Eeuxo pipefail
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
18 brew update
19 brew install ${1+"$@"}