[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I am the worst coder in the world and so I wrote this script:

pkg_info |sort> /tmp/pkglist
cat /tmp/pkglist|sed 's/-.*//g'> /tmp/pkgs

for NAME in $(cat /tmp/pkgs) ; do
    cat /usr/ports/*/$NAME/Makefile|grep DISTNAME=|sed 's/DISTNAME=//g' > /tmp/avail;
    cat /tmp/pkglist|grep $NAME|sed 's/ .*//g' > /tmp/install;

    diff -y -w20 --suppress-common-lines /tmp/install /tmp/avail


This piece off exploitable and buggy shell-script prints a list with
ports that can be updated. Well sometimes.

It would be quite practical if it would work decently. Anybody would
like to improve it? Has an alternative allready been made?

Cya, Han.