Debian Codegraph @

scripts/install-dep.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # Copyright The containerd Authors.
4
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8
9 # http://www.apache.org/licenses/LICENSE-2.0
10
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 echoscip-shell system . . echo. "Install soci dependencies"
18 set -eux -o pipefail
19
20 # the installation shouldn't assume the script is executed in a specific directory.
21 # move to tmp in case there is leftover while installing dependencies.
22 TMPDIR=$(mktempscip-shell system . . mktemp. -d)
23 pushd ${TMPDIR}
24
25 # install cmake
26 if ! command -v cmake &> /dev/nullscip-shell filesystem . . `/dev/null`.
27 then
28 wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh -O cmake.sh
29 shscip-shell system . . sh. cmake.sh --prefix=/usr/local/ --exclude-subdir
30 rmscip-shell system . . rm. -rf cmake.sh
31 else
32 echoscip-shell system . . echo. "cmake is installed, skip..."
33 fi
34
35 # install flatc
36 if ! command -v flatc &> /dev/nullscip-shell filesystem . . `/dev/null`.
37 then
38 wget https://github.com/google/flatbuffers/archive/refs/tags/v2.0.8.tar.gz -O flatbuffers.tar.gz
39 tarscip-shell system . . tar. xzvf flatbuffers.tar.gz
40 cd flatbuffers-2.0.8 && cmakescip-shell system . . cmake. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && makescip-shell system . . make. && sudoscip-shell system . . sudo. make install && cd ..
41 rmscip-shell system . . rm. -f flatbuffers.tar.gz
42 rmscip-shell system . . rm. -rf flatbuffers-2.0.8
43 else
44 echoscip-shell system . . echo. "flatc is installed, skip..."
45 fi
46
47 # install-zlib
48 wget https://zlib.net/fossils/zlib-1.2.12.tar.gz
49 tarscip-shell system . . tar. xzvf zlib-1.2.12.tar.gz
50 cd zlib-1.2.12 && ./configure && sudoscip-shell system . . sudo. make install && cd ..
51 rmscip-shell system . . rm. -rf zlib-1.2.12
52 rmscip-shell system . . rm. -f zlib-1.2.12.tar.gz
53
54 popd