diff options
author | Erich Eckner <git@eckner.net> | 2020-06-04 09:57:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-06-04 09:57:12 +0200 |
commit | cecc3c1cc9890fc80926afa4f1be032c5413b3cd (patch) | |
tree | 4cf65bb25555c96167e31ab904995a28f7fc288c | |
parent | c3f55a1643898055419771f4431eb3e522c8d6af (diff) | |
download | archlinuxewe.git.save-cecc3c1cc9890fc80926afa4f1be032c5413b3cd.tar.xz |
liste-verfuegbare-Versionen neu - bumpPkgrel-Funktion dorthin ausgelagert
-rwxr-xr-x | bumpPkgrel | 35 | ||||
-rwxr-xr-x | liste-verfuegbare-Versionen | 38 |
2 files changed, 39 insertions, 34 deletions
@@ -19,41 +19,8 @@ if [ "x$1" = 'x-p' ]; then provided="$2" shift else - provided=$(mktemp) + provided=$("${0%/*}/liste-verfuegbare-Versionen") trap 'rm -f "${provided}"' EXIT - - 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}" fi pin_dependency() { diff --git a/liste-verfuegbare-Versionen b/liste-verfuegbare-Versionen new file mode 100755 index 00000000..40011081 --- /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}" |