Clarified variables in pkgverchecker

This commit is contained in:
Mike Staszel 2010-10-28 04:12:05 -05:00
parent 47df06778e
commit f2f8c9dfac

View file

@ -5,29 +5,25 @@
# output the differences, i.e. what packages need to be upgraded.
ABSDIR=/build/abs
REPODIR=/build/packages
GITDIR=/build/plugapps
if [[ ! $* ]]; then
echo "usage: $0 <repository>"
exit 1
fi
echo "$1"
cd $REPODIR/$1
cd $GITDIR/$1
for i in `find . -maxdepth 1 -mindepth 1 -type d|sort`; do
PKGNAME=`grep ^pkgname= $i/PKGBUILD | sed -e 's/pkgname=//'`
PKGVER=`grep ^pkgver= $i/PKGBUILD | sed -e 's/pkgver=//'`
PKGREL=`grep ^pkgrel= $i/PKGBUILD | sed -e 's/pkgrel=/-/'`
if [[ -e $ABSDIR/$1/$i ]]; then
ABSVER=`grep ^pkgver= $ABSDIR/$1/$i/PKGBUILD | sed -e 's/pkgver=//'`
ABSREL=`grep ^pkgrel= $ABSDIR/$1/$i/PKGBUILD | sed -e 's/pkgrel=/-/'`
if [[ "$ABSVER$ABSREL" != "$PKGVER$PKGREL" ]]; then
echo "$PKGNAME $PKGVER$PKGREL -> $ABSVER$ABSREL"
fi
fi
done