1#!/bin/sh 2 3# FIG : Facility for Interactive Generation of figures 4# Copyright (c) 1985-1988 by Supoj Sutanthavibul 5# Parts Copyright (c) 1989-2015 by Brian V. Smith 6# Parts Copyright (c) 1991 by Paul King 7# Parts Copyright (c) 2016-2019 by Thomas Loimer 8# 9# Any party obtaining a copy of these files is granted, free of charge, a 10# full and unrestricted irrevocable, world-wide, paid up, royalty-free, 11# nonexclusive right and license to deal in this software and documentation 12# files (the "Software"), including without limitation the rights to use, 13# copy, modify, merge, publish, distribute, sublicense and/or sell copies 14# of the Software, and to permit persons who receive copies from any such 15# party to do so, with the only requirement being that the above copyright 16# and this permission notice remain intact. 17# 18# 19# update-version_m4: Set the version information in version.m4. 20# Author: Thomas Loimer, 2016 21# 22 23if (git --version) >/dev/null 2>&1 && test "`git describe --abbrev=1`" != \ 24 "`sed -n '/^m4_def.*XFIG_VERS/ {s/.*, *\[\(.*\)\])/\1/;p}' version.m4`" 25then 26 sed -i "\ 27 /^m4_define(\[\{0,1\}XFIG_VERSION/ s/\(.*, *\[\).*\]/\1`git describe --abbrev=1`]/ 28 /^m4_define(\[\{0,1\}RELEASEDATE/ s/\(.*, *\[\).*\]/\1`LC_TIME=C git show -s --pretty=%cd --date=format:'%b %Y'`]/" version.m4 29fi 30