Skip to content

Commit

Permalink
add a function to diff all installed ebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
novas0x2a committed Mar 4, 2012
1 parent 7d8a1b6 commit 3813d10
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .zsh/functions/gentoo_diff_pkgs
@@ -0,0 +1,20 @@
#!/bin/zsh

gentoo_diff_pkgs() {
for x in $(find /var/db/pkg -mindepth 2 -maxdepth 2 -type d); do
local repo=$(<$x/repository)

if [[ $repo != gentoo ]]; then
echo "Skipping $x from $repo" >&2
continue
fi

local base=$(echo $x | cut -d / -f 5,6)
local -a atom
atom=($(qatom $base))
local src=/usr/portage/$atom[1]/$atom[2]/${(j:-:)atom[2,-1]}.ebuild

diff -u -I '$Header:' -I 'KEYWORDS=' -I '# Copyright' $x $src 2>/dev/null

done
}

0 comments on commit 3813d10

Please sign in to comment.