Debian Codegraph @

bin/current-package-version

raw symbols SCIP
1 #! /bin/bash
2 #
3 # bin/current-package-version
4 # Part of ComixCursors, a desktop cursor theme.
5 #
6 # Copyright © 2010–2013 Ben Finney <[email protected]>
7 #
8 # This work is free software: you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This work is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this work. If not, see <http://www.gnu.org/licenses/>.
20
21 # Parse the NEWS document and output the current version string.
22
23 bindir="$(dirname $0)"
24
25 newsfile="$(dirname ${bindir})"/NEWS
26
27 current_release_header=$(
28 "${bindir}"/news-to-specfile-changelog < "${newsfile}" | head -n 1)
29
30 current_version=$(
31 printf "${current_release_header}" | sed -e 's/^.\+ - \([^ ]\+\)$/\1/')
32
33 printf ${current_version}