From 47412ddaa279480e3cf317aeea9c5d548c1544f7 Mon Sep 17 00:00:00 2001 From: oklopfer <104327997+oklopfer@users.noreply.github.com> Date: Thu, 4 Jul 2024 15:00:38 -0400 Subject: [PATCH] fix(install.sh): drop `check_url` (#1168) Co-authored-by: ook37 --- install.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/install.sh b/install.sh index 7e4669099..8a8020711 100755 --- a/install.sh +++ b/install.sh @@ -56,28 +56,6 @@ function fancy_message() { esac } -function check_url() { - http_code="$(curl -o /dev/null -s --head --write-out '%{http_code}\n' -- "${1}")" - case "${http_code}" in - 000) - fancy_message error "Failed to download file, check your connection" - error_log 1 "get ${PACKAGE} pacscript" - return 1 - ;; - 404) - fancy_message error "The URL cannot be found" - return 1 - ;; - 200 | 301 | 302) - true - ;; - *) - fancy_message error "Failed with http code ${http_code}" - return 1 - ;; - esac -} - ((EUID != 0)) && { fancy_message error "Must be root to install Pacstall!"; exit 1; } if [[ ! -t 0 ]]; then @@ -96,13 +74,6 @@ fi echo -e "${PACYELLOW}┌────────────────────────┐\n│ ${PACCYAN}Pacstall Installer${PACYELLOW} │\n└────────────────────────┘${NC}" -if [[ ${GITHUB_ACTIONS} != "true" ]]; then - check_url "https://github.com" || { - fancy_message error "Could not connect to the internet" - exit 1 - } -fi - echo if [[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -7)" ]]; then fancy_message info "Updating"