]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- script for getting package revisions for list of spec files
authorMarcin Krol <hawk@tld-linux.org>
Tue, 28 Jul 2015 09:30:31 +0000 (11:30 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 28 Jul 2015 09:30:31 +0000 (11:30 +0200)
client/get_pkgrevs.sh [new file with mode: 0755]

diff --git a/client/get_pkgrevs.sh b/client/get_pkgrevs.sh
new file mode 100755 (executable)
index 0000000..86333db
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if test -z $1; then
+  echo "Usage: $0 <file with list of specs>"
+  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