Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
bash
get_version_number.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get_version_number.sh of Package bash
#!/bin/bash # Note: this file is used in the spec file, do not remove it # Print the highest version number of the patches from the archive sourcedir=$1 test -n "${sourcedir}" || sourcedir=$PWD test -e ${sourcedir}/bash.spec || exit 1 version=$(sed -rn '/^%define[[:space:]]+bversion/{s/^%define[[:space:]]+bversion[[:space:]]+([0-9]+\.[0-9]+)(\.[^\.]+)?/\1/p}' ${sourcedir}/bash.spec) || exit 1 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]} OFS="$IFS" IFS=- 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" shopt -s extglob echo ${last[3]##+(0)}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor