2012-09-13 22:29:54 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-20 04:42:36 +04:00
|
|
|
exit_unless_xcode_exists() {
|
|
|
|
if [ ! -d /Applications/Xcode.app ]; then
|
|
|
|
echo "ERROR: Atom requires Xcode"
|
|
|
|
echo "You must to download Xcode from the App Store (http://itunes.apple.com/us/app/xcode/id497799835)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
exit_unless_npm_exists() {
|
2012-09-22 00:29:35 +04:00
|
|
|
if ! hash npm 2> /dev/null; then
|
2012-09-20 04:42:36 +04:00
|
|
|
echo "ERROR: Atom requires npm"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
exit_unless_xcode_exists
|
|
|
|
exit_unless_npm_exists
|
2013-03-12 02:59:34 +04:00
|
|
|
|
2013-03-27 01:31:33 +04:00
|
|
|
npm install npm --silent
|
2013-03-21 21:56:43 +04:00
|
|
|
|
2013-03-12 02:59:34 +04:00
|
|
|
NODE_DIR="$HOME/.cefode-gyp"
|
2013-04-04 17:18:21 +04:00
|
|
|
NODE_VERSION="0.10.3"
|
2013-03-24 15:39:23 +04:00
|
|
|
NODE_URL="https://gh-contractor-zcbenz.s3.amazonaws.com/cefode2/dist"
|
2013-03-14 04:58:22 +04:00
|
|
|
if [ ! -d "node_modules/node-gyp" ]; then
|
2013-03-27 01:31:33 +04:00
|
|
|
./node_modules/.bin/npm install node-gyp --silent
|
2013-03-19 23:32:50 +04:00
|
|
|
HOME="$NODE_DIR" ./node_modules/.bin/node-gyp install --target="$NODE_VERSION" --dist-url="$NODE_URL" --arch=ia32
|
2013-03-12 02:59:34 +04:00
|
|
|
fi
|
2013-03-27 01:31:33 +04:00
|
|
|
HOME="$NODE_DIR" ./node_modules/.bin/npm install --target="$NODE_VERSION" --arch=ia32 --silent
|
2013-01-03 23:02:03 +04:00
|
|
|
git submodule --quiet sync
|
|
|
|
git submodule --quiet update --recursive --init
|