diff --git a/.travis.yml b/.travis.yml index 0694c5208..60ae450fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,9 @@ before_install: - npm install -g npm - npm install -g grunt-cli karma-cli + # install the dev packages we need + - ./misc/install.sh + # Set up Xfvb for Firefox headless testing - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" diff --git a/misc/check.sh b/misc/check.sh new file mode 100755 index 000000000..0a4650ca7 --- /dev/null +++ b/misc/check.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# check for libcairo2 +if [ -f /usr/include/cairo/cairo.h ] || [ -f /usr/local/include/cairo/cairo.h ]; then + echo libcairo2 dev files found. + exit 0 +else + echo "\033[31m"libcairo2 dev files not found. Please run misc/install.sh to install the necessary packages."\033[0m" >&2 + exit 1 +fi diff --git a/misc/install.sh b/misc/install.sh old mode 100644 new mode 100755 diff --git a/package.json b/package.json index 814e4586a..9d3bd1da6 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "test-examples": "grunt mochaTest:examples && karma start test/examples/karma.conf.js", "test-tcp": "grunt mochaTest:tcp", "publish": "grunt build", - "preinstall": "sh misc/install.sh" + "preinstall": "sh misc/check.sh" }, "repository": { "type": "git",