Files
atom/script/bootstrap
Corey Johnson 49d270d4ec Taking the the gyp formula out of the formula directory
I'm a shallow directory fan, when we have more than one formula I'd be done with adding it back.
2012-10-12 09:25:51 -07:00

31 lines
605 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_brew_exists() {
if ! hash brew 2> /dev/null; then
echo "ERROR: Atom requires brew"
exit 1
fi
}
exit_unless_xcode_exists
exit_unless_npm_exists
exit_unless_brew_exists
npm install
brew install tools/gyp-formula.rb