pulsar/script/bootstrap
Cheng Zhao 94e7011413 Update node version to v0.10.9.
Should make this default settings after atom-shell branch is merged.
2013-06-02 10:25:35 +08:00

33 lines
761 B
Bash
Executable File

#!/bin/sh
# exit on subprocess errors
set -o errexit
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
git submodule --quiet sync
git submodule --quiet update --recursive --init
export ATOM_NODE_URL='https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist'
export ATOM_NODE_VERSION='0.10.9'
(cd vendor/apm && npm install .)
npm install --silent vendor/apm
./node_modules/.bin/apm install --silent