From da60791e1f59666d458f5d761db605360870909c Mon Sep 17 00:00:00 2001 From: Pascal Roeleven Date: Tue, 7 Mar 2023 10:59:48 +0100 Subject: [PATCH] Only install apt-fast from source if not present --- install_and_cache_pkgs.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install_and_cache_pkgs.sh b/install_and_cache_pkgs.sh index 3ef616d..d85381d 100755 --- a/install_and_cache_pkgs.sh +++ b/install_and_cache_pkgs.sh @@ -37,12 +37,14 @@ write_manifest "main" "${manifest_main}" "${cache_dir}/manifest_main.log" log_empty_line -log "Installing apt-fast for optimized installs..." -# Install apt-fast for optimized installs. -/bin/bash -c "$(curl -sL https://git.io/vokNn)" -log "done" +if ! apt-fast --version > /dev/null 2>&1; then + log "Installing apt-fast for optimized installs..." + # Install apt-fast for optimized installs. + /bin/bash -c "$(curl -sL https://git.io/vokNn)" + log "done" -log_empty_line + log_empty_line +fi log "Updating APT package list..." if [[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mmin -5)" ]]; then