From 3c81a8b2345f199ef06122b9f40b2e60644968a3 Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Sun, 15 Dec 2024 03:19:41 -0500 Subject: [PATCH] fix dep check --- src/lib/util.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/lib/util.sh b/src/lib/util.sh index 04d93c53b1a..f368ba04c82 100644 --- a/src/lib/util.sh +++ b/src/lib/util.sh @@ -11,26 +11,22 @@ sudonot() { } apt_install() { - apt-get install -yqq "$@" || { + sudonot apt-get install -yqq "$@" || { apt-get update - apt-get install -yqq "$@" + sudonot apt-get install -yqq "$@" } } yq_install() { - mv -f /usr/bin/yq /usr/bin/yq.bak - curl -sSLNZo /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 - chmod +x /usr/bin/yq + sudonot mv -f /usr/bin/yq /usr/bin/yq.bak + sudonot curl -sSLNZo /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + sudonot chmod +x /usr/bin/yq } -dep_check() { - echo "Verifying dependencies..." - apt_install git curl jq parallel sqlite3 sqlite3-pcre zstd libxml2-utils - yq -V | grep -q mikefarah || yq_install - echo "Dependencies verified!" -} - -sudonot dep_check +echo "Verifying dependencies..." +apt_install git curl jq parallel sqlite3 sqlite3-pcre zstd libxml2-utils +yq -V | grep -q mikefarah || yq_install +echo "Dependencies verified!" # shellcheck disable=SC2046 source $(which env_parallel.bash) env_parallel --session