mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
Inital commit.
This commit is contained in:
37
images/linux/scripts/installers/hhvm.sh
Normal file
37
images/linux/scripts/installers/hhvm.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: hhvm.sh
|
||||
## Desc: Installs hhvm
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
hhvm_package=hhvm
|
||||
|
||||
# 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 ! IsInstalled ${hhvm_package}; then
|
||||
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
|
||||
add-apt-repository https://dl.hhvm.com/ubuntu
|
||||
apt-get update
|
||||
apt-get -qq install -y hhvm
|
||||
else
|
||||
echo "${hhvm_package} already installed"
|
||||
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 ! IsInstalled ${hhvm_package}; then
|
||||
echo "${hhvm_package} was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v hhvm; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "HHVM ($(hhvm --version | head -n 1))"
|
||||
Reference in New Issue
Block a user