3 . `dirname $0`/../config.sh
5 if test -z "${localdir}"; then
6 echo skipping due to missing local archive
12 NOCPY_TEMPLATE=$topdir/etc/copyright_error
13 NOCPY_BIN_TEMPLATE=$topdir/etc/copyright_error_bin
15 logs="$topdir/files/logs"
16 log="${logs}/changelogs.log"
18 test -d "$logs" || mkdir -p "$logs"
19 test -d "$tmpdir" || mkdir -p "$tmpdir"
23 savelog -c 14 "$log" > /dev/null
30 for part in $parts; do
31 time "${bindir}/extract_files" -v -d "${localdir}/pool/$part/" \
32 -t "${htmldir}/changelogs/pool/$part/" \
33 -c "$configdir" -w "$tmpdir" \
34 --dumpfile "${filesdir}/changelogs.$part.dump" \
35 --cachefile "${filesdir}/changelogs.cache" --debug
37 echo program exited with non-zero exitcode: $? >&2
42 if [ "$successful" -eq 1 ]; then
43 find -H "${htmldir}/changelogs/" -name log -cmin +14440 \
44 | while read logfile; do
45 dir=$(dirname "$logfile")
48 rmdir --ignore-fail-on-non-empty $(dirname "$dir")
51 find -H "${htmldir}/changelogs/" -name current -not -xtype d \
53 dir=$(dirname "$link")
54 echo repairing current link $link
56 target=$(ls -t1 "$dir" | tail -n1)
57 if [ -n "$target" ]; then
58 cd $dir && ln -sv $target current
66 echo clean-up skipped because at least one of the extraction runs failed >&2