From a7d145534909b72724e0f9a7fa7cc48272117c16 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 24 Oct 2016 14:41:57 +0200 Subject: prueft nun auch Aktualitaet --- pruefe-aktualitaet | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 pruefe-aktualitaet (limited to 'pruefe-aktualitaet') 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 -- cgit v1.2.3-70-g09d2