From 3c8b230cc38af6e9770dffceb22a79102b8bb6ec Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 12 Nov 2024 13:10:57 -0500 Subject: [PATCH] Skip unavailable dependencies --- openwrtbuilder | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openwrtbuilder b/openwrtbuilder index 28a4b54..c9b5bb6 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -101,8 +101,8 @@ init() { # Set distro-specific functions case "$ID" in - fedora|centos) pkg_install(){ sudo "$RPM_MGR" install -y "$@"; } ;; - debian|ubuntu) pkg_install(){ sudo apt-get install -y -q0 "$@"; } ;; + fedora|centos) pkg_install(){ sudo "$RPM_MGR" install --skip-unavailable -y "$@"; } ;; + debian|ubuntu) pkg_install(){ sudo apt-get install --ignore-missing -y -q0 "$@"; } ;; suse) pkg_install(){ sudo zypper --non-interactive -q install --force --no-confirm "$@"; } ;; arch) pkg_install(){ sudo pacman -S --noconfirm --needed "$@"; } ;; esac @@ -182,7 +182,6 @@ install_dependencies() { "wget" "which" "diffutils" - "python2" "python3" "python3-setuptools" "python3-pyelftools" @@ -316,7 +315,6 @@ install_dependencies() { get_imagebuilder() { debug "${FUNCNAME[0]}" "$*" - local -a url_file_pairs=("$@") for ((i=0; i<${#url_file_pairs[@]}; i+=2)); do @@ -782,4 +780,4 @@ main() { } main "$@" -exit $? \ No newline at end of file +exit