Skip to content

Commit

Permalink
Merge pull request #178 from RobotWebTools/remove_sudo
Browse files Browse the repository at this point in the history
removed sudo from npm install and provides a check instead
  • Loading branch information
rctoris committed Apr 10, 2015
2 parents 9ad62a1 + 57a21e9 commit 2bb38df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
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

0 comments on commit 2bb38df

Please sign in to comment.