mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
Another mop up commit to add missing changes from the last mop-up.
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: cmake.sh
|
||||
## Desc: Installs CMake
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# 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
|
||||
echo "Example variable already set to $EXAMPLE_VAR"
|
||||
else
|
||||
curl -sL https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh -o cmakeinstall.sh \
|
||||
&& 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
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "CMake ($(cmake --version | head -n 1))"
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: cmake.sh
|
||||
## Desc: Installs CMake
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# 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
|
||||
echo "Example variable already set to $EXAMPLE_VAR"
|
||||
else
|
||||
curl -sL https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh -o cmakeinstall.sh \
|
||||
&& 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
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "CMake ($(cmake --version | head -n 1))"
|
||||
|
||||
Reference in New Issue
Block a user