xref: /OpenGrok/dev/before_install (revision 43834e8ceb739549727c69f567f2c40865ee8d95)
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
10fb84416eSVladimir Kotal	sudo apt-get install -qq \
11fb84416eSVladimir Kotal	    cvs \
12fb84416eSVladimir Kotal	    git \
13fb84416eSVladimir Kotal	    mercurial \
14fb84416eSVladimir Kotal	    cssc \
15fb84416eSVladimir Kotal	    bzr \
16fb84416eSVladimir Kotal	    subversion \
17fb84416eSVladimir Kotal	    monotone \
18fb84416eSVladimir Kotal	    rcs \
19fb84416eSVladimir Kotal	    rcs-blame \
20fb84416eSVladimir Kotal	    python3 \
21fb84416eSVladimir Kotal	    python3-venv \
22fb84416eSVladimir Kotal	    python3-pip \
2389259090SVladimir Kotal	    nodejs \
2489259090SVladimir Kotal	    jq
25df8ae9f1SVladimir Kotal	if [[ $? != 0 ]]; then
26df8ae9f1SVladimir Kotal		echo "cannot install extra packages"
27df8ae9f1SVladimir Kotal		exit 1
28df8ae9f1SVladimir Kotal	fi
29b4571310SVladimir Kotal
30519a8457SVladimir Kotal	# Bitkeeper install failure is not critical, so exit code is not checked.
318182cfb4SVladimir Kotal	sudo ./dev/install-bitkeeper.sh
32519a8457SVladimir Kotal
33*43834e8cSVladimir Kotal	sudo -H ./dev/install-python-packages.sh
34519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
35519a8457SVladimir Kotal		echo "cannot install Python packages"
36519a8457SVladimir Kotal		exit 1
37519a8457SVladimir Kotal	fi
389f2d396bSVladimir Kotal
399f2d396bSVladimir Kotal	# We only need to preserve TRAVIS_OS_NAME but older sudo do not
409f2d396bSVladimir Kotal	# support argument to --preserve-env.
419f2d396bSVladimir Kotal	sudo --preserve-env ./dev/install-universal_ctags.sh
429f2d396bSVladimir Kotal	if [[ $? != 0 ]]; then
439f2d396bSVladimir Kotal		echo "cannot install Universal ctags"
449f2d396bSVladimir Kotal		exit 1
459f2d396bSVladimir Kotal	fi
469f2d396bSVladimir Kotal
479f2d396bSVladimir Kotal	# for API blueprint verification
489f2d396bSVladimir Kotal	npm install drafter
49aba5f4cfSVladimir Kotalelif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
5061569491SLubos Kosco#	brew update
5176041b3fSLubos Kosco        export HOMEBREW_NO_AUTO_UPDATE=1
52519a8457SVladimir Kotal
5389259090SVladimir Kotal	brew install cvs libgit2 jq
54519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
55519a8457SVladimir Kotal		echo "cannot install extra packages"
56519a8457SVladimir Kotal		exit 1
57519a8457SVladimir Kotal	fi
58519a8457SVladimir Kotal
5988c623c9SLubos Kosco	brew install python3
60aba5f4cfSVladimir Kotal	brew upgrade python
61519a8457SVladimir Kotal
62b4571310SVladimir Kotal	./dev/install-python-packages.sh
63519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
64519a8457SVladimir Kotal		echo "cannot install Python packages"
65519a8457SVladimir Kotal		exit 1
66519a8457SVladimir Kotal	fi
672a63f72dSVladimir Kotal
689f2d396bSVladimir Kotal	# We only need to preserve TRAVIS_OS_NAME but older sudo do not
699f2d396bSVladimir Kotal	# support argument to --preserve-env.
709f2d396bSVladimir Kotal	sudo --preserve-env ./dev/install-universal_ctags.sh
71171dfcf1SVladimir Kotal	if [[ $? != 0 ]]; then
72171dfcf1SVladimir Kotal		echo "cannot install Universal ctags"
73171dfcf1SVladimir Kotal		exit 1
74171dfcf1SVladimir Kotal	fi
759f2d396bSVladimir Kotalfi
76