File: version.sh

package info (click to toggle)
libraw 0.19.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,396 kB
  • sloc: cpp: 39,147; ansic: 23,363; perl: 145; makefile: 87; sh: 77
file content (16 lines) | stat: -rwxr-xr-x 468 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

vfile=./libraw/libraw_version.h

major=`grep LIBRAW_MAJOR_VERSION $vfile |head -1 | awk '{print $3}'`
minor=`grep LIBRAW_MINOR_VERSION $vfile | head -1 | awk '{print $3}'`
patch=`grep LIBRAW_PATCH_VERSION $vfile | head -1 | awk '{print $3}'`
tail=`grep LIBRAW_VERSION_TAIL $vfile | head -1 | awk '{print $3}'`

if [ x$tail = xRelease ] ; then
 echo "$major.$minor.$patch" | awk '{printf $1}'
else
 echo "$major.$minor.$patch-$tail" | awk '{printf $1}'
fi