diff --git a/download_pkgs b/download_pkgs index 44df54f..e9ea51a 100755 --- a/download_pkgs +++ b/download_pkgs @@ -36,14 +36,15 @@ done rm -rf download sort -o pkgs -u pkgs -cat "$import_list" >> depends +sed 's/^#'"$(dpkg --print-architecture)"' //;/^#/d' < "$import_list" | grep syslinux > arch_import_list +cat arch_import_list >> depends aptitude search '?priority(required)|?priority(important)' -F '%p' -q | cut -d : -f 1 >> depends sort -o depends -u depends join -v 1 depends pkgs > needed xargs apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances < needed | grep '^\w' | cut -d : -f 1 | sort | uniq > recursive_depends -join -v 1 recursive_depends pkgs | { grep -v -x -f "$exclude_patterns" || true; } > recursive_needed +join -v 1 <(cat arch_import_list recursive_depends | sort | uniq) pkgs | { grep -v -x -f "$exclude_patterns" || true; } > recursive_needed mkdir apt_download (cd apt_download && xargs apt-get download) < recursive_needed