forked from wrljet/hercules-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper-build-cmake-opensuse.sh
executable file
·53 lines (41 loc) · 1.2 KB
/
helper-build-cmake-opensuse.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
#!/usr/bin/env bash
# helper-build-cmake-opensuse.sh
#
# Helper to build CMake on OpenSUSE
#
# The most recent version of this project can be obtained with:
# git clone https://github.com/wrljet/hercules-helper.git
# or:
# wget https://github.com/wrljet/hercules-helper/archive/master.zip
#
# Please report errors in this to me so everyone can benefit.
#
# Bill Lewis bill@wrljet.com
#
#-----------------------------------------------------------------------------
#
# This works for me, but should be considered just an example
msg="$(basename "$0"):
This script will build and install CMake on OpenSUSE.
Your sudo password will be required.
"
echo "$msg"
read -p "Ctrl+C to abort here, or hit return to continue"
#-----------------------------------------------------------------------------
sudo zypper update
zypper search cmake
sudo zypper -n install wget git
sudo zypper -n install openssl libopenssl-devel
mkdir -p ./tools
pushd ./tools
wget https://cmake.org/files/v3.20/cmake-3.20.3.tar.gz
tar xfz cmake-3.20.3.tar.gz
cd cmake-3.20.3/
./bootstrap --prefix=/usr/local
gmake -j$(nproc)
sudo make install
hash -r
# cd someplace else so we don't find a cmake in the same directory
cd ..
cmake --version
popd