]>
Commit | Line | Data |
---|---|---|
657343a6 LS |
1 | #!/usr/bin/env bash |
2 | # | |
3 | # Install dependencies required to build and test Git on Linux and macOS | |
4 | # | |
5 | ||
c2160f2d | 6 | . ${0%/*}/lib.sh |
657343a6 | 7 | |
f67242c1 JH |
8 | P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION |
9 | LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION | |
10 | ||
bf427a94 SG |
11 | case "$jobname" in |
12 | linux-clang|linux-gcc) | |
0f0c5118 SG |
13 | sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test" |
14 | sudo apt-get -q update | |
15 | sudo apt-get -q -y install language-pack-is git-svn apache2 | |
16 | case "$jobname" in | |
17 | linux-gcc) | |
18 | sudo apt-get -q -y install gcc-8 | |
19 | ;; | |
20 | esac | |
21 | ||
83d1efe5 SG |
22 | mkdir --parents "$P4_PATH" |
23 | pushd "$P4_PATH" | |
f67242c1 JH |
24 | wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d" |
25 | wget --quiet "$P4WHENCE/bin.linux26x86_64/p4" | |
26 | chmod u+x p4d | |
27 | chmod u+x p4 | |
f67242c1 | 28 | popd |
83d1efe5 SG |
29 | mkdir --parents "$GIT_LFS_PATH" |
30 | pushd "$GIT_LFS_PATH" | |
f67242c1 JH |
31 | wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" |
32 | tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" | |
33 | cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs . | |
f67242c1 | 34 | popd |
657343a6 | 35 | ;; |
bf427a94 | 36 | osx-clang|osx-gcc) |
f67242c1 JH |
37 | brew update --quiet |
38 | # Uncomment this if you want to run perf tests: | |
39 | # brew install gnu-time | |
40 | brew install git-lfs gettext | |
41 | brew link --force gettext | |
42 | brew install caskroom/cask/perforce | |
657343a6 | 43 | ;; |
0f0c5118 SG |
44 | StaticAnalysis) |
45 | sudo apt-get -q update | |
46 | sudo apt-get -q -y install coccinelle | |
47 | ;; | |
48 | Documentation) | |
49 | sudo apt-get -q update | |
50 | sudo apt-get -q -y install asciidoc xmlto | |
51 | ;; | |
657343a6 LS |
52 | esac |
53 | ||
0f0c5118 SG |
54 | if type p4d >/dev/null && type p4 >/dev/null |
55 | then | |
56 | echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)" | |
57 | p4d -V | grep Rev. | |
58 | echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)" | |
59 | p4 -V | grep Rev. | |
60 | fi | |
61 | if type git-lfs >/dev/null | |
62 | then | |
63 | echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)" | |
64 | git-lfs version | |
65 | fi |