Link apt-fast to apt-get if missing

This commit is contained in:
Shivam Mathur 2024-06-16 08:07:19 +05:30
parent b5f04d97d9
commit 193510cd90
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -6,6 +6,14 @@ add_sudo() {
fi 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. # Function to setup environment for self-hosted runners.
self_hosted_helper() { self_hosted_helper() {
if ! command -v apt-fast >/dev/null; then if ! command -v apt-fast >/dev/null; then
@ -289,6 +297,7 @@ apt_install="sudo $debconf_fix apt-fast install -y --no-install-recommends"
scripts="$src"/scripts scripts="$src"/scripts
add_sudo >/dev/null 2>&1 add_sudo >/dev/null 2>&1
link_apt_fast >/dev/null 2>&1
. /etc/os-release . /etc/os-release
# shellcheck source=. # shellcheck source=.