mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[ubuntu] Refactor bash functions (#9055)
This commit is contained in:
committed by
GitHub
parent
d16bc5f120
commit
503ae89818
@@ -5,8 +5,8 @@
|
||||
################################################################################
|
||||
|
||||
download_with_retry() {
|
||||
url=$1
|
||||
download_path=$2
|
||||
local url=$1
|
||||
local download_path=$2
|
||||
|
||||
if [ -z "$download_path" ]; then
|
||||
download_path="/tmp/$(basename "$url")"
|
||||
@@ -45,15 +45,6 @@ download_with_retry() {
|
||||
echo "$download_path"
|
||||
}
|
||||
|
||||
## Use dpkg to figure out if a package has already been installed
|
||||
## Example use:
|
||||
## if ! IsPackageInstalled packageName; then
|
||||
## echo "packageName is not installed!"
|
||||
## fi
|
||||
IsPackageInstalled() {
|
||||
dpkg -S $1 &> /dev/null
|
||||
}
|
||||
|
||||
get_toolset_value() {
|
||||
local toolset_path="/imagegeneration/installers/toolset.json"
|
||||
local query=$1
|
||||
|
||||
Reference in New Issue
Block a user