mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Rename IsIntalled -> IsPackageInstalled
This commit is contained in:
@@ -37,9 +37,9 @@ download_with_retries() {
|
|||||||
|
|
||||||
## Use dpkg to figure out if a package has already been installed
|
## Use dpkg to figure out if a package has already been installed
|
||||||
## Example use:
|
## Example use:
|
||||||
## if ! IsInstalled packageName; then
|
## if ! IsPackageInstalled packageName; then
|
||||||
## echo "packageName is not installed!"
|
## echo "packageName is not installed!"
|
||||||
## fi
|
## fi
|
||||||
function IsInstalled {
|
function IsPackageInstalled {
|
||||||
dpkg -S $1 &> /dev/null
|
dpkg -S $1 &> /dev/null
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ PACKAGE=build-essential
|
|||||||
|
|
||||||
# Test to see if the software in question is already installed, if not install it
|
# 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"
|
echo "Checking to see if the installer script has already been run"
|
||||||
if ! IsInstalled $PACKAGE; then
|
if ! IsPackageInstalled $PACKAGE; then
|
||||||
echo "Installing $PACKAGE"
|
echo "Installing $PACKAGE"
|
||||||
apt-get install -y --no-install-recommends $PACKAGE
|
apt-get install -y --no-install-recommends $PACKAGE
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ fi
|
|||||||
|
|
||||||
## Check to see if docker is already installed
|
## Check to see if docker is already installed
|
||||||
echo "Determing if Docker ($docker_package) is installed"
|
echo "Determing if Docker ($docker_package) is installed"
|
||||||
if ! IsInstalled $docker_package; then
|
if ! IsPackageInstalled $docker_package; then
|
||||||
echo "Docker ($docker_package) was not found. Installing..."
|
echo "Docker ($docker_package) was not found. Installing..."
|
||||||
apt-get remove -y moby-engine moby-cli
|
apt-get remove -y moby-engine moby-cli
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|||||||
|
|
||||||
for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||||
echo "Determing if .NET Core ($latest_package) is installed"
|
echo "Determing if .NET Core ($latest_package) is installed"
|
||||||
if ! IsInstalled $latest_package; then
|
if ! IsPackageInstalled $latest_package; then
|
||||||
echo "Could not find .NET Core ($latest_package), installing..."
|
echo "Could not find .NET Core ($latest_package), installing..."
|
||||||
apt-get install $latest_package -y
|
apt-get install $latest_package -y
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ hhvm_package=hhvm
|
|||||||
|
|
||||||
# Test to see if the software in question is already installed, if not install it
|
# 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"
|
echo "Checking to see if the installer script has already been run"
|
||||||
if ! IsInstalled ${hhvm_package}; then
|
if ! IsPackageInstalled ${hhvm_package}; then
|
||||||
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
|
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94
|
||||||
add-apt-repository https://dl.hhvm.com/ubuntu
|
add-apt-repository https://dl.hhvm.com/ubuntu
|
||||||
apt-get update
|
apt-get update
|
||||||
@@ -23,7 +23,7 @@ fi
|
|||||||
|
|
||||||
# Run tests to determine that the software installed as expected
|
# Run tests to determine that the software installed as expected
|
||||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||||
if ! IsInstalled ${hhvm_package}; then
|
if ! IsPackageInstalled ${hhvm_package}; then
|
||||||
echo "${hhvm_package} was not installed"
|
echo "${hhvm_package} was not installed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user