summaryrefslogtreecommitdiff
path: root/pruefe-aktualitaet
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-10-24 14:41:57 +0200
committerErich Eckner <git@eckner.net>2016-10-24 14:41:57 +0200
commita7d145534909b72724e0f9a7fa7cc48272117c16 (patch)
tree282594fca413b96bec35be9beefb5445e83d783c /pruefe-aktualitaet
parent60a0f8895f12522a278f134d84fe4e0ffd09d6fc (diff)
downloadwurzel-paket-tools-a7d145534909b72724e0f9a7fa7cc48272117c16.tar.xz
prueft nun auch AktualitaetHEADmaster
Diffstat (limited to 'pruefe-aktualitaet')
-rwxr-xr-xpruefe-aktualitaet64
1 files changed, 64 insertions, 0 deletions
diff --git a/pruefe-aktualitaet b/pruefe-aktualitaet
new file mode 100755
index 0000000..692ed9e
--- /dev/null
+++ b/pruefe-aktualitaet
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+set -e
+
+if [ ! "$(readlink -f "$0")" == "$0" ]
+then
+ "$(readlink -f "$0")" "$@"
+ exit $?
+fi
+
+if [ $# -eq 0 ]
+then
+ erg="$(
+ "$0" $(
+ ls /usr/ports/distfiles | \
+ grep '^wurzel-' | \
+ sed 's|-[0-9.]\+\.tar\.bz2$||' | \
+ sort -u
+ )
+ )"
+ if [ -n "${erg}" ]
+ then
+ echo "${erg}"
+ exit 1
+ fi
+ exit
+elif [ $# -gt 1 ]
+then
+ for pkg in "$@"
+ do
+ echo "${pkg}"
+ done | \
+ parallel "$0"
+ exit
+fi
+
+. "/usr/ports/deepthought/$1/Pkgfile"
+
+beenden()
+{
+ if [ -n "${tmpDir}" ]
+ then
+ rm -rf "${tmpDir}"
+ fi
+ exit $1
+}
+
+tmpDir="$(mktemp -d)"
+cd "${tmpDir}"
+tar -xjf "/usr/ports/distfiles/${source##*/}"
+
+dateien="$(
+ grep "^${name}:" "$(dirname "$0")/dateien" | \
+ sed 's|^[^:]\+:\(.*/\)\([^/]*\)$|s@ \2$@ \1\2@;|'
+)"
+
+find . -type f -exec sha512sum {} \; | \
+ sed 's|^\(\S\+ \).*/\([^/]*\)$|\1\2|' | \
+ sed "${dateien}" | \
+ ssh wurzel 'sha512sum -c' 2>&1 | \
+ grep -v ': OK$' | \
+ sed 's|^|'"${name}"': |'
+
+beenden 0