Skip to content

Commit

Permalink
Link apt-fast to apt-get if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jun 16, 2024
1 parent b5f04d9 commit 193510c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/scripts/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ add_sudo() {
fi
}

# Function to link apt-fast to apt-get
link_apt_fast() {
if ! command -v apt-fast >/dev/null; then
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit
fi
}

# Function to setup environment for self-hosted runners.
self_hosted_helper() {
if ! command -v apt-fast >/dev/null; then
Expand Down Expand Up @@ -289,6 +297,7 @@ apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends"
scripts="$src"/scripts

add_sudo >/dev/null 2>&1
link_apt_fast >/dev/null 2>&1

. /etc/os-release
# shellcheck source=.
Expand Down

0 comments on commit 193510c

Please sign in to comment.