summaryrefslogtreecommitdiff
path: root/configure
blob: 3ec6d4d12de5f2684c487108ec5063ad3ecae0c2 (plain)
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
32
33
34
35
36
37
38
39
#!/usr/bin/env bash

set -eu

node_version=$(node --version)
if [ ! "$?" -eq 0 ]; then
  echo 'Error: node executable not found.'
  echo 'If you are using ubuntu or debian, try installing the'
  echo 'node-legacy package or symlink node to nodejs.'
  exit 1
fi
echo "Using node ${node_version}"

if ! node -p 'process.exit(!(/v([0-9]+)/.exec(process.version)[1] >= 4))'; then
  echo 'Your node version is too old, use something >v4.x.x'
  exit 1
fi

if ! yarn --version &>/dev/null; then
  echo 'Error: yarn missing. See https://yarnpkg.com/en/docs/install'
  exit 1
fi

if ! find --version &>/dev/null; then
  echo 'Error: find missing'
  exit 1
fi

if ! xargs --version &>/dev/null; then
  echo 'Error: xargs missing'
  exit 1
fi

if ! msgmerge --version &>/dev/null; then
  echo "Warning: msgmerge missing, i18n won't work"
  exit 1
fi