diff options
author | Erich Eckner <git@eckner.net> | 2016-10-24 14:41:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-10-24 14:41:57 +0200 |
commit | a7d145534909b72724e0f9a7fa7cc48272117c16 (patch) | |
tree | 282594fca413b96bec35be9beefb5445e83d783c | |
parent | 60a0f8895f12522a278f134d84fe4e0ffd09d6fc (diff) | |
download | wurzel-paket-tools-master.tar.xz |
-rwxr-xr-x | pruefe-aktualitaet | 64 |
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 |