From ce665559df6538bbb173b3747ac2bbe30189bbca Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 5 Jul 2011 17:27:22 +0400 Subject: [PATCH] portage-exclude script --- bash/portage-exclude/portage-exclude.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bash/portage-exclude/portage-exclude.sh diff --git a/bash/portage-exclude/portage-exclude.sh b/bash/portage-exclude/portage-exclude.sh new file mode 100755 index 0000000..5cb6677 --- /dev/null +++ b/bash/portage-exclude/portage-exclude.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd /usr/portage/ || exit -1 +for d in *-*; do + if [[ `qlist -IC $d/ | wc -l` == 0 ]]; then + echo $d/ + else + for pn in $d/*; do + if [[ `qlist -IC $pn | wc -l` == 0 ]]; then + echo $pn/ + fi + done + fi +done +