2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
## File: cmake.sh
|
|
|
|
|
## Desc: Installs CMake
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
# Test to see if the software in question is already installed, if not install it
|
|
|
|
|
echo "Checking to see if the installer script has already been run"
|
|
|
|
|
if command -v cmake; then
|
2020-04-30 17:04:38 -07:00
|
|
|
echo "cmake is already installed"
|
2019-12-13 09:48:00 -05:00
|
|
|
else
|
2020-04-08 20:06:19 +02:00
|
|
|
curl -sL https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.sh -o cmakeinstall.sh \
|
2019-12-13 09:48:00 -05:00
|
|
|
&& chmod +x cmakeinstall.sh \
|
|
|
|
|
&& ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
|
|
|
|
|
&& rm cmakeinstall.sh
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Run tests to determine that the software installed as expected
|
|
|
|
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
|
|
|
|
if ! command -v cmake; then
|
|
|
|
|
echo "cmake was not installed"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|