#!/bin/sh # telepített összes dpkg --get-selections | grep -v deinstall$ | awk '{ print $1 }' > /tmp/installed_all # telepített kötelező ( for p in $(cat /tmp/installed_all); do req=$(apt-cache show "$p" | grep '^Priority:' | awk '{ print $2 }'); if [ "$req" = "required" ]; then echo $p; fi; done ) > /tmp/installed_req # telepített kötelező teljes függősége ( for p in $(cat /tmp/installed_req); do python all_deps.py "$p"; done) 2> /dev/null > /tmp/installeq_req_depends cat /tmp/installeq_req_depends | tr " " "\n" | sort | uniq > /tmp/installeq_req_depends_clean dist=ubuntu ( for p in $(echo "${dist}-desktop ubuntu-minimal"); do python all_deps.py "$p"; done) 2> /dev/null > /tmp/installed_desktop_depends echo "${dist}-desktop ubuntu-minimal" >> /tmp/installed_desktop_depends cat /tmp/installed_desktop_depends | tr " " "\n" | sort | uniq > /tmp/installed_desktop_depends_clean rm -rf /tmp/installed_desktop_depends /tmp/installeq_req_depends /tmp/installed_req # kivonatolas ( cat /tmp/installed_all | sort | uniq; cat /tmp/installeq_req_depends_clean /tmp/installed_desktop_depends_clean \ | sort | uniq) | sort | uniq -u > /tmp/need rm -rf /tmp/installed_desktop_depends /tmp/installeq_req_depends /tmp/installed_req /tmp/installed_all /tmp/installed_desktop_depends_clean /tmp/installeq_req_depends_clean cat /tmp/need rm /tmp/need