#!/bin/bash if [[ "$TRAVIS_OS_NAME" == "linux" || "$RUNNER_OS" == "Linux" ]]; then sudo apt-get update -qq if [[ $? != 0 ]]; then echo "cannot update" exit 1 fi sudo apt-get install -qq \ cvs \ git \ mercurial \ cssc \ bzr \ subversion \ monotone \ rcs \ rcs-blame \ python3 \ python3-venv \ python3-pip \ nodejs \ jq if [[ $? != 0 ]]; then echo "cannot install extra packages" exit 1 fi # Bitkeeper install failure is not critical, so exit code is not checked. sudo ./dev/install-bitkeeper.sh sudo -H ./dev/install-python-packages.sh if [[ $? != 0 ]]; then echo "cannot install Python packages" exit 1 fi # We only need to preserve TRAVIS_OS_NAME but older sudo do not # support argument to --preserve-env. sudo --preserve-env ./dev/install-universal_ctags.sh if [[ $? != 0 ]]; then echo "cannot install Universal ctags" exit 1 fi # for API blueprint verification npm install drafter elif [[ "$TRAVIS_OS_NAME" == "osx" || "$RUNNER_OS" == "macOS" ]]; then # brew update export HOMEBREW_NO_AUTO_UPDATE=1 brew install cvs libgit2 jq autoconf automake if [[ $? != 0 ]]; then echo "cannot install extra packages" exit 1 fi brew install python3 brew upgrade python ./dev/install-python-packages.sh if [[ $? != 0 ]]; then echo "cannot install Python packages" exit 1 fi # We only need to preserve TRAVIS_OS_NAME but older sudo do not # support argument to --preserve-env. sudo --preserve-env ./dev/install-universal_ctags.sh if [[ $? != 0 ]]; then echo "cannot install Universal ctags" exit 1 fi fi