Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed sudo from npm install and provides a check instead #178

Merged
merged 4 commits into from
Apr 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions misc/check.sh
Original file line number Diff line number Diff line change
@@ -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
Empty file modified misc/install.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down