mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-02 20:07:25 +03:00
b006841fa7
This ensures the expected version is used regardless of the global version already installed. Closes #439
33 lines
917 B
Bash
Executable File
33 lines
917 B
Bash
Executable File
#!/bin/sh
|
|
|
|
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() {
|
|
if ! hash npm 2> /dev/null; then
|
|
echo "ERROR: Atom requires npm"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
exit_unless_xcode_exists
|
|
exit_unless_npm_exists
|
|
|
|
npm install npm
|
|
|
|
NODE_DIR="$HOME/.cefode-gyp"
|
|
NODE_VERSION="0.8.21"
|
|
NODE_URL="https://gh-contractor-zcbenz.s3.amazonaws.com/cefode/dist"
|
|
if [ ! -d "node_modules/node-gyp" ]; then
|
|
./node_modules/.bin/npm install node-gyp
|
|
HOME="$NODE_DIR" ./node_modules/.bin/node-gyp install --target="$NODE_VERSION" --dist-url="$NODE_URL" --arch=ia32
|
|
fi
|
|
HOME="$NODE_DIR" ./node_modules/.bin/npm install --target="$NODE_VERSION" --arch=ia32
|
|
git submodule --quiet sync
|
|
git submodule --quiet update --recursive --init
|