-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_build_tools_ubuntu.sh
executable file
·73 lines (65 loc) · 2.1 KB
/
install_build_tools_ubuntu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#
# Copyright 2015-2021 by Kevin L. Goodwin [[email protected]]; All rights reserved
#
# This file is part of K.
#
# K is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# K is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with K. If not, see <http:#www.gnu.org/licenses/>.
#
# run to unilaterally install prereqs for building & running K
hdr="$ID K-prereq-install: "
complete() {
local rv="$?"
[ "$rv" -gt "0" ] && { echo "${hdr}FAILED" ; exit 1 ; }
echo "to build & install universal-ctags: run ./ubuntu_univ-ctags_build_install"
echo "${hdr}SUCCEEDED"
exit 0
}
. /etc/os-release
if [[ "$ID" = "ubuntu" || "$ID" = "pop" ]] ; then
echo "${hdr}STARTING"
sudo apt-get install -yq \
build-essential \
g++ \
libboost-dev \
libboost-filesystem-dev \
libboost-system-dev \
libncurses5-dev \
libpcre2-dev \
ncurses-term \
libreadline-dev \
universal-ctags \
xclip
complete
fi
if [ "$ID" = "centos" ] ; then
echo "${hdr}STARTING"
yum -yq groupinstall "Development Tools" &&
yum -yq install boost-devel ncurses-devel pcre2-devel pcre2-static ncurses-term readline-devel &&
yum -yq install exuberant-ctags &&
yum -yq install xclip
complete
fi
echo "${hdr}FAILED: '$ID' unknown" ;
exit 1
# notes (not used): alternative yum version
yum groupinstall "Development Tools"
yum install libboost-devel
yum install libboost-filesystem-devel
yum install libboost-system-devel
yum install libncurses5-devel
yum install libpcre3-devel
yum install exuberant-ctags
yum install ncurses-term
yum install xclip