File: update-version_m4

package info (click to toggle)
fig2dev 1%3A3.2.8b-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,832 kB
  • sloc: ansic: 37,603; sh: 7,021; makefile: 175; csh: 12
file content (31 lines) | stat: -rwxr-xr-x 1,329 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

# Fig2dev: Translate Fig code to various Devices
# Copyright (c) 1991 by Micah Beck
# Parts Copyright (c) 1985-1988 by Supoj Sutanthavibul
# Parts Copyright (c) 1989-2015 by Brian V. Smith
# Parts Copyright (c) 2015-2019 by Thomas Loimer
#
# Any party obtaining a copy of these files is granted, free of charge, a
# full and unrestricted irrevocable, world-wide, paid up, royalty-free,
# nonexclusive right and license to deal in this software and documentation
# files (the "Software"), including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense and/or sell copies
# of the Software, and to permit persons who receive copies from any such
# party to do so, with the only requirement being that the above copyright
# and this permission notice remain intact.
#
#

#
# update-version_m4: Set the version information in version.m4.
# Author: Thomas Loimer <thomas.loimer@tuwien.ac.at>, 2016
#

if (git --version) >/dev/null 2>&1 && test "`git describe --abbrev=1`" != \
	"`sed -n '/^m4_def.*FIG_VERS/ {s/.*, *\[\(.*\)\])/\1/;p}' version.m4`"
then
    sed  -i "\
	/^m4_define(\[\{0,1\}FIG_VERSION/ s/\(.*, *\[\).*\]/\1`git describe --abbrev=1`]/
	/^m4_define(\[\{0,1\}RELEASEDATE/ s/\(.*, *\[\).*\]/\1`LC_TIME=C git show -s --pretty=%cd --date=format:'%b %Y'`]/" version.m4
fi