From acf579536ede0a4e3882a2a2548cc5a85c8985dde35b8172ba7c1279a8e830b4 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 24 Feb 2022 08:40:56 +0000 Subject: [PATCH] get_version_number.sh OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=342 --- bash-rpmlintrc | 3 ++- get_version_number.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bash-rpmlintrc b/bash-rpmlintrc index e18ef16..afd9db3 100644 --- a/bash-rpmlintrc +++ b/bash-rpmlintrc @@ -1,3 +1,4 @@ -addFilter(".*hidden-file-or-dir.*/etc/skel/\..*") +addFilter(".*shared-library-without-dependency-information.*") +addFilter(".*useless-provides.*") addFilter(".*zero-length.*/etc/skel/\..*") addFilter(".*call-to-mktemp.*/usr/bin/bash.*") diff --git a/get_version_number.sh b/get_version_number.sh index b690686..a6a085a 100644 --- a/get_version_number.sh +++ b/get_version_number.sh @@ -7,9 +7,9 @@ version=$(sed -rn '/^%define[[:space:]]+bversion/{s/^%define[[:space:]]+bversion test -e ${sourcedir}/bash-${version}.tar.gz || exit 1 last=($(tar Oxf ${sourcedir}/bash-${version}.tar.gz bash-${version}/configure.ac | sed -rn '/^define.bashvers/{s/^define\(bashvers,[[:space:]]([0-9\.]+)\)/\1/p}')) || exit 1 test -e ${sourcedir}/bash-${version}-patches.tar.bz2 || echo ${last[0]} -tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-[0-9]*' &> /dev/null || echo ${last[0]} +tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' &> /dev/null || echo ${last[0]} OFS="$IFS" IFS=- -last=($(tar -tf ${sourcedir}/bash-${version}-patches.tar.bz2 | sed -r 's@\.patch$@@'| sort -t '-' -k 3,3 -n | tail -n 1)) +last=($(tar --wildcards -tf ${sourcedir}/bash-${version}-patches.tar.bz2 '*/bash[0-9][0-9]-*[0-9]' | sed -r 's@\.patch$@@'| sort -t '-' -k 3,3 -n | tail -n 1)) IFS="$OFS" echo ${last[3]/*0/}