From cecc3c1cc9890fc80926afa4f1be032c5413b3cd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 4 Jun 2020 09:57:12 +0200 Subject: liste-verfuegbare-Versionen neu - bumpPkgrel-Funktion dorthin ausgelagert --- liste-verfuegbare-Versionen | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 liste-verfuegbare-Versionen (limited to 'liste-verfuegbare-Versionen') diff --git a/liste-verfuegbare-Versionen b/liste-verfuegbare-Versionen new file mode 100755 index 000000000..400110812 --- /dev/null +++ b/liste-verfuegbare-Versionen @@ -0,0 +1,38 @@ +#!/bin/bash + +provided=$(mktemp) + +find /var/lib/pacman/sync/ -name '*.db' \ + -not -exec tar -Oxzf {} --wildcards '*/desc' \; \ + -not -exec tar -OxJf {} --wildcards '*/desc' \; \ + -not -exec tar -Oxjf {} --wildcards '*/desc' \; \ + -not -exec tar -Oxf {} --wildcards '*/desc' \; \ +2>/dev/null \ +| sed -n ' + /^%\(NAME\|VERSION\)%$/ { + N + s/\n/ / + p + } + /^%PROVIDES%$/,/^$/ { + /^[^%]/ p + } +' \ +| sed -n ' + s/=/ / + T no_provides + p + d + :no_provides + /^%NAME%/ { + N + s/^%NAME% \(\S\+\)\n%VERSION% \(\S\+\)-\S\+$/\2 \1/ + T + p + } +' \ +| sort -k2,2 -k1Vr,1 \ +| uniq -f1 \ +>"${provided}" + +printf '%s\n' "${provided}" -- cgit v1.2.3-70-g09d2