xref: /OpenGrok/dev/before_install (revision fb84416e3788c282165fe1551ddde6cba4bb15a0)
1aba5f4cfSVladimir Kotal#!/bin/bash
2aba5f4cfSVladimir Kotal
3aba5f4cfSVladimir Kotalif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
4aba5f4cfSVladimir Kotal	sudo apt-get update -qq
5df8ae9f1SVladimir Kotal	if [[ $? != 0 ]]; then
6df8ae9f1SVladimir Kotal		echo "cannot update"
7df8ae9f1SVladimir Kotal		exit 1
8df8ae9f1SVladimir Kotal	fi
9b4571310SVladimir Kotal
10*fb84416eSVladimir Kotal	sudo apt-get install -qq \
11*fb84416eSVladimir Kotal	    cvs \
12*fb84416eSVladimir Kotal	    git \
13*fb84416eSVladimir Kotal	    mercurial \
14*fb84416eSVladimir Kotal	    cssc \
15*fb84416eSVladimir Kotal	    bzr \
16*fb84416eSVladimir Kotal	    subversion \
17*fb84416eSVladimir Kotal	    monotone \
18*fb84416eSVladimir Kotal	    rcs \
19*fb84416eSVladimir Kotal	    rcs-blame \
20*fb84416eSVladimir Kotal	    python3 \
21*fb84416eSVladimir Kotal	    python3-venv \
22*fb84416eSVladimir Kotal	    python3-pip \
23*fb84416eSVladimir Kotal	    nodejs
24df8ae9f1SVladimir Kotal	if [[ $? != 0 ]]; then
25df8ae9f1SVladimir Kotal		echo "cannot install extra packages"
26df8ae9f1SVladimir Kotal		exit 1
27df8ae9f1SVladimir Kotal	fi
28b4571310SVladimir Kotal
29519a8457SVladimir Kotal	# Bitkeeper install failure is not critical, so exit code is not checked.
308182cfb4SVladimir Kotal	sudo ./dev/install-bitkeeper.sh
31519a8457SVladimir Kotal
32519a8457SVladimir Kotal	sudo ./dev/install-python-packages.sh
33519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
34519a8457SVladimir Kotal		echo "cannot install Python packages"
35519a8457SVladimir Kotal		exit 1
36519a8457SVladimir Kotal	fi
37aba5f4cfSVladimir Kotalelif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
38aba5f4cfSVladimir Kotal	brew update
39519a8457SVladimir Kotal
401377c869SVladimir Kotal	brew install cvs
41519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
42519a8457SVladimir Kotal		echo "cannot install extra packages"
43519a8457SVladimir Kotal		exit 1
44519a8457SVladimir Kotal	fi
45519a8457SVladimir Kotal
46aba5f4cfSVladimir Kotal	brew upgrade python
47519a8457SVladimir Kotal
48b4571310SVladimir Kotal	./dev/install-python-packages.sh
49519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
50519a8457SVladimir Kotal		echo "cannot install Python packages"
51519a8457SVladimir Kotal		exit 1
52519a8457SVladimir Kotal	fi
53aba5f4cfSVladimir Kotalfi
542a63f72dSVladimir Kotal
552a63f72dSVladimir Kotalsudo ./dev/install-universal_ctags.sh
56171dfcf1SVladimir Kotalif [[ $? != 0 ]]; then
57171dfcf1SVladimir Kotal	echo "cannot install Universal ctags"
58171dfcf1SVladimir Kotal	exit 1
59171dfcf1SVladimir Kotalfi
60193b2204SVladimir Kotal
61193b2204SVladimir Kotal# for API blueprint verification
62193b2204SVladimir Kotalnpm install drafter
63