portage-exclude-gen.sh готов и протестирован, работает лучше, чем в /usr/local/sbin/...
This commit is contained in:
parent
f70f8bff88
commit
fbf9724034
|
@ -2,25 +2,24 @@
|
|||
|
||||
ninstalled=0
|
||||
installed=
|
||||
for p in `qlist -IC | sort -d`; do
|
||||
for p in `qlist -IC`; do
|
||||
installed[ninstalled]=$p
|
||||
let ninstalled++
|
||||
done
|
||||
|
||||
idx=0
|
||||
cd /usr/portage/ || exit -1
|
||||
dir_list=`ls -1 --color=never -d */ | sort -d`
|
||||
dir_list=`ls -1 --color=never -d *-*/ virtual/ | sed 's~/$~~' | sort`
|
||||
for d in $dir_list ; do
|
||||
d=${d%/}
|
||||
if [[ `qlist -IC $d | wc -l` == 0 ]]; then
|
||||
echo $d
|
||||
echo $d/
|
||||
else
|
||||
pn_list=`ls -1 --color=never -d ${d}*/ | sort -d`
|
||||
pn_list=`ls -1 --color=never -d ${d}/*/ | sed 's~/$~~' | sort`
|
||||
for pn in $pn_list; do
|
||||
pn=${pn%/}
|
||||
#echo PN=$pn
|
||||
#echo INSTALLED[$idx]=${installed[$idx]}
|
||||
|
||||
while [[ "`echo ${installed[$idx]} | sed 's~\-~\~~g'`" < "`echo $pn | sed 's~\-~\~~g'`" && $idx -lt $ninstalled ]]; do
|
||||
while [[ "${installed[$idx]}" < "$pn" && $idx -lt $ninstalled ]]; do
|
||||
let idx++
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue