Files
atom/script/bootstrap
Cheng Zhao 1254561724 There is no need to call node-gyp externally any more.
From npm v1.2.19, the npm_config_disturl is supported to set dist-url
for node-gyp, so we don't need to interactive with node-gyp ourselves
any more.
2013-05-20 15:27:12 +08:00

34 lines
804 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
npm install npm --silent
export npm_config_disturl="https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist"
export npm_config_target="0.10.5"
export npm_config_arch="ia32"
NODE_DIR="$HOME/.atom-shell-gyp"
HOME=$NODE_DIR ./node_modules/.bin/npm install --silent
git submodule --quiet sync
git submodule --quiet update --recursive --init