aboutsummaryrefslogtreecommitdiff
path: root/.github/scripts/install_deps.sh
blob: bb998732673bbbd9fea8ca349003431fb181943d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

SUDO="sudo"

while (($# > 0)); do
  case $1 in
  --test) # install test dependencies
    TEST=1
    shift
    ;;
  --container) # don't use sudo
    SUDO=""
    shift
    ;;
  esac
done

os=$(uname -s)
if [[ $os == Linux ]]; then
  $SUDO apt-get update
  $SUDO apt-get install -y build-essential cmake curl gettext ninja-build pkg-config unzip
  if [[ -n $TEST ]]; then
    $SUDO apt-get install -y locales-all cpanminus
  fi
elif [[ $os == Darwin ]]; then
  brew update --quiet
  brew install ninja
  if [[ -n $TEST ]]; then
    brew install cpanminus
  fi
fi