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