hub/script/bootstrap

38 строки
707 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ -n "$TRAVIS" ]; then
case "$TRAVIS_OS_NAME" in
linux ) cache_name="tmux-zsh.ubuntu" ;;
osx ) cache_name="tmux.osx" ;;
* )
echo "unknown OS: $TRAVIS_OS_NAME" >&2
exit 1
;;
esac
curl -fsSL "https://${AMAZON_S3_BUCKET}.s3.amazonaws.com/${cache_name}.tgz" | tar -xz -C ~
exit 0
fi
STATUS=0
if ! go version; then
echo "You need to install Go 1.5.3 or higher to build hub" >&2
STATUS=1
fi
{ ruby --version
bundle install --path vendor/bundle
bundle binstub rake cucumber
} || {
echo "You need Ruby 1.9 or higher and Bundler to run hub tests" >&2
STATUS=1
}
if [ $STATUS -eq 0 ]; then
echo "Everything OK."
fi
exit $STATUS