Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bmwiedemann:reproducible:distribution:ring0rb
ncurses
get_version_number.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File get_version_number.sh of Package ncurses
#!/bin/bash # Note: this file is used in the spec file, do not remove it sourcedir=$1 test -n "${sourcedir}" || sourcedir=$PWD test -e ${sourcedir}/ncurses.spec || exit 1 version=$(sed -rn '/^Version:[[:space:]]+/{s/^Version:[[:space:]]+([0-9]+\.[0-9]+)(\.[^\.]+)?/\1/p}' ${sourcedir}/ncurses.spec) || exit 1 test -e ${sourcedir}/ncurses-${version}.tar.gz || exit 1 last=($(tar Oxf ${sourcedir}/ncurses-${version}.tar.gz ncurses-${version}/VERSION)) || exit 1 test -e ${sourcedir}/ncurses-${version}-patches.tar.bz2 || echo ${last[2]} tar --wildcards -tf ${sourcedir}/ncurses-${version}-patches.tar.bz2 '*/*.patch.gz' &> /dev/null || { echo ${last[2]}; exit 0; } OFS="$IFS" IFS=- last=($(tar -tf ${sourcedir}/ncurses-${version}-patches.tar.bz2 | grep -v 'gz.asc' | sed -r 's@\.patch\.gz$@@'| sort -t '-' -k 3,3 -n | tail -n 1)) IFS="$OFS" echo ${last[2]}
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