#!/bin/bash cd $(dirname $0) err=false for paket in */PKGBUILD do . $paket echo "${source}" | \ grep -q "opensources\.eckner\.net" || \ continue remSum="$(curl -o - "${source#*::}&post=sha256sum" 2> /dev/null)" if [ ! "${remSum}" == "${sha256sums}" ] then echo "sha256sum von ${pkgname} stimmt nicht: ${remSum} vs. ${sha256sums}." err=true fi done ${err} && exit 1 pakete="$( \ for paket in $( \ echo */PKGBUILD | \ sed "s|/PKGBUILD||g" \ ) do ls ${paket}/${paket}*.pkg.tar.xz | \ sort -V | \ tail -n1 done )" scp ${pakete} paule@jeti100:/srv/arch-mirror/arch/arch/archlinuxewe/os/x86_64/ ssh paule@jeti100 \ '\ cd /srv/arch-mirror/arch/arch/archlinuxewe/os/x86_64/ for paket in $( \ ls *.pkg.tar.xz | \ sed "s|\(-[^-]*\)\{3\}\$||" | \ uniq \ ) do alles="$(ls ${paket}*.pkg.tar.xz)" anz="$(echo "${alles}" | wc -l)" for version in $( \ echo "${alles}" | \ sed "s|^.*-\([^-]*-[^-]*\)-[^-]*\$|\1|" | \ sort -V | \ head -n$[${anz}-1] \ ) do rm ${paket}-${version}-*.pkg.tar.xz done done repo-add \ /srv/arch-mirror/arch/arch/archlinuxewe/os/x86_64/archlinuxewe.db.tar.gz \ /srv/arch-mirror/arch/arch/archlinuxewe/os/x86_64/*.pkg.tar.xz '