blob: 692ed9e77cdb14bf52115a0aa609e554eb8669f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
|