mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
29 lines
955 B
Text
Executable file
29 lines
955 B
Text
Executable file
# This is a simple package version checker (for now)
|
|
#
|
|
# So far it only lists the names and versions of packages in ABS.
|
|
# Planned is to grab repository pkgvers, then ABS vers, and only
|
|
# output the differences, i.e. what packages need to be upgraded.
|
|
|
|
ABSDIR=/build/abs
|
|
GITDIR=/build/plugapps
|
|
|
|
if [[ ! $* ]]; then
|
|
echo "usage: $0 <repository>"
|
|
exit 1
|
|
fi
|
|
echo "$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
|