Quellcode durchsuchen

Skip unavailable dependencies

bryan vor 5 Monaten
Ursprung
Commit
3c8b230cc3
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 3 5
      openwrtbuilder

+ 3 - 5
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 $?
+exit