diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 000000000..18c14097f --- /dev/null +++ b/configure @@ -0,0 +1,38 @@ +#!/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' +fi + +if ! npm --version >/dev/null; then + echo 'Node Package Manager (npm) missing' + 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 + + |