Advertisement
Shnatsel

dist-recommends.sh

Aug 16th, 2014
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. #!/bin/bash
  2. set -e
  3.  
  4. # Finds all packages pulled in by the given package
  5. # that have not single a strict dependency on them
  6. # in a Debian-based distro.
  7.  
  8. recommends_file=$(mktemp)
  9. depends_file=$(mktemp)
  10.  
  11. apt-rdepends --show=Recommends "$1" | cut --only-delimited -d ' ' -f 4 | sort -u > "$recommends_file"
  12. apt-rdepends "$1" | cut --only-delimited -d ' ' -f 4 | sort -u > "$depends_file"
  13.  
  14. comm -23 "$recommends_file" "$depends_file"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement