File: getversion

package info (click to toggle)
giflib 5.1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,648 kB
  • sloc: ansic: 6,970; xml: 2,474; makefile: 340; sh: 4
file content (10 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
#
# getversion - get the librarty version by analyzing its header
#
# Done this way so there's a single point of truth about the version.
#
MAJOR=`sed <gif_lib.h -n -e "/MAJOR/s/#define GIFLIB_MAJOR  *//p"`
MINOR=`sed <gif_lib.h -n -e "/MINOR/s/#define GIFLIB_MINOR  *//p"`
RELEASE=`sed <gif_lib.h -n -e "/RELEASE/s/#define GIFLIB_RELEASE  *//p"`
echo ${MAJOR}.${MINOR}.${RELEASE}