text="$msg_remove_bloat"
[ "$DEBUG" ] && set -x
+ n=0
pkglist=$(mktemp /var/lib/carnet-upgrade/pkglist.XXXXXX)
COLUMNS=200 dpkg -l | awk '$1 ~ /^.i/ { print $2 }' > $pkglist
for i in $(echo "$bloats" | sed 's/ */ /g'| awk -F' ' '{print $2}')
add_this="$(echo "$bloats" | egrep " .*\b${i}\b" | sed 's/ */ /g'| awk -F' ' '{print $1}')"
if ! echo "$to_show" | grep -q "$add_this"; then
to_show="$to_show \"$add_this\" \"\" on"
+ n=$(($n+1))
fi
fi
done
[ "$DEBUG" ] || rm -f $pkglist
[ -z "$to_show" ] && return 0
+ test $n -gt 8 && n=8
tmpfile=$(mktemp /var/lib/carnet-upgrade/dialog-tmp.XXXXXX)
- cmd="dialog --nocancel --backtitle \""$title"\" --checklist \""$text"\" 20 75 8 $to_show"
+ cmd="dialog --nocancel --backtitle \""$title"\" --checklist \""$text"\" 20 75 $n $to_show"
[ "$DEBUG" ] && set +x
eval $cmd 2> $tmpfile
[ "$DEBUG" ] && set -x