File: getversion

package info (click to toggle)
giflib 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,900 kB
  • sloc: ansic: 7,492; xml: 2,479; makefile: 389; javascript: 12; sh: 4
file content (10 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download | duplicates (3)
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}