From: Marcin Krol Date: Tue, 28 Jul 2015 09:30:31 +0000 (+0200) Subject: - script for getting package revisions for list of spec files X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=55ab82f613c82507fbdce7341edfb16daf106b75;p=tld-builder.git - script for getting package revisions for list of spec files --- diff --git a/client/get_pkgrevs.sh b/client/get_pkgrevs.sh new file mode 100755 index 0000000..86333db --- /dev/null +++ b/client/get_pkgrevs.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if test -z $1; then + echo "Usage: $0 " + exit +fi + +for pkg in $(cat $1 | sed -e 's/\.spec$//g;'); do + rm -f /tmp/$pkg.tags + wget http://pkgrevs.tld-linux.org/list/$pkg -O /tmp/$pkg.tags 1>/dev/null 2>&1 + atag=$(head -n 1 /tmp/$pkg.tags) + rm -f /tmp/$pkg.tags + if [ "x$atag" = "x" ]; then + echo "$pkg.spec" + else + echo "$pkg.spec:$atag" + fi +done