xref: /OpenGrok/dev/before_install (revision 912a7afac1cb6bc9412b56f950e1638a7b0d0584)
1aba5f4cfSVladimir Kotal#!/bin/bash
2aba5f4cfSVladimir Kotal
3d06d067eSVladimir Kotalif [[ "$RUNNER_OS" == "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	    mercurial \
13fb84416eSVladimir Kotal	    cssc \
14fb84416eSVladimir Kotal	    bzr \
15fb84416eSVladimir Kotal	    subversion \
16fb84416eSVladimir Kotal	    rcs \
17fb84416eSVladimir Kotal	    rcs-blame \
18fb84416eSVladimir Kotal	    python3 \
19fb84416eSVladimir Kotal	    python3-venv \
20fb84416eSVladimir Kotal	    python3-pip \
2189259090SVladimir Kotal	    nodejs \
2289259090SVladimir Kotal	    jq
23df8ae9f1SVladimir Kotal	if [[ $? != 0 ]]; then
24df8ae9f1SVladimir Kotal		echo "cannot install extra packages"
25df8ae9f1SVladimir Kotal		exit 1
26df8ae9f1SVladimir Kotal	fi
27b4571310SVladimir Kotal
28519a8457SVladimir Kotal	# Bitkeeper install failure is not critical, so exit code is not checked.
298182cfb4SVladimir Kotal	sudo ./dev/install-bitkeeper.sh
30519a8457SVladimir Kotal
3143834e8cSVladimir Kotal	sudo -H ./dev/install-python-packages.sh
32519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
33519a8457SVladimir Kotal		echo "cannot install Python packages"
34519a8457SVladimir Kotal		exit 1
35519a8457SVladimir Kotal	fi
369f2d396bSVladimir Kotal
37d06d067eSVladimir Kotal	sudo ./dev/install-universal_ctags.sh
389f2d396bSVladimir Kotal	if [[ $? != 0 ]]; then
399f2d396bSVladimir Kotal		echo "cannot install Universal ctags"
409f2d396bSVladimir Kotal		exit 1
419f2d396bSVladimir Kotal	fi
429f2d396bSVladimir Kotal
43d06d067eSVladimir Kotalelif [[ "$RUNNER_OS" == "macOS" ]]; then
4476041b3fSLubos Kosco        export HOMEBREW_NO_AUTO_UPDATE=1
45519a8457SVladimir Kotal
46*912a7afaSVladimir Kotal	brew install cvs libgit2 jq autoconf automake mercurial
47519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
48519a8457SVladimir Kotal		echo "cannot install extra packages"
49519a8457SVladimir Kotal		exit 1
50519a8457SVladimir Kotal	fi
51519a8457SVladimir Kotal
5288c623c9SLubos Kosco	brew install python3
53aba5f4cfSVladimir Kotal	brew upgrade python
54519a8457SVladimir Kotal
55b4571310SVladimir Kotal	./dev/install-python-packages.sh
56519a8457SVladimir Kotal	if [[ $? != 0 ]]; then
57519a8457SVladimir Kotal		echo "cannot install Python packages"
58519a8457SVladimir Kotal		exit 1
59519a8457SVladimir Kotal	fi
602a63f72dSVladimir Kotal
61d06d067eSVladimir Kotal	sudo ./dev/install-universal_ctags.sh
62171dfcf1SVladimir Kotal	if [[ $? != 0 ]]; then
63171dfcf1SVladimir Kotal		echo "cannot install Universal ctags"
64171dfcf1SVladimir Kotal		exit 1
65171dfcf1SVladimir Kotal	fi
669f2d396bSVladimir Kotalfi
67