\s-1gnu\s0 shtool maintain version information file
shtool version [-l|--language lang] [-n|--name name] [-p|--prefix prefix] [-s|--set version] [-e|--edit] [-i|--increase knob] [-d|--display type] file
This command displays and maintains version information in file.
The version is always described with a triple <version,revision,level> and is represented by a string which always matches the regular expression "\*(C`[0-9]+\.[0-9]+[sabp.][0-9]+\*(C'".
The hexadecimal format for a version \*(C`v.rtl\*(C' is \*(C`VVRRTLL\*(C' where \*(C`VV\*(C' and \*(C`RR\*(C' directly correspond to \*(C`v\*(C' and \*(C`r\*(C', \*(C`T\*(C' encodes the level type as 9, 2, 1, 0 (representing \*(C`s\*(C', \*(C`p\*(C'/\*(C`.\*(C', \*(C`b\*(C', \*(C`a\*(C' in this order) and \*(C`LL\*(C' is either directly corresponding to \*(C`l\*(C' or set to 99 if level type is \*(C`s\*(C'.
The following command line options are available.
Print verbose information during processing.
Choose format of version file file. lang="\*(C`txt\*(C'", \s-1ANSI\s0 C (lang=\*(L"c\*(R"), M4 (lang=\*(L"m4\*(R"), Perl (lang=\*(L"perl\*(R") or Python (lang=\*(L"python\*(R"). Default is \*(C`txt\*(C'.
Name the program the version is maintained for. Default is \*(C`unknown\*(C'.
Set the version to version.
Interactively enter a new version.
When option ``-i'' is used, the current version in file is updated by increasing one element of the version where knob can be one of the following: ``\*(C`v\*(C''' for increasing the version by 1 (and resetting revision and level to 0), ``\*(C`r\*(C''' for increasing the revision by 1 (and resetting level to 0) or ``\*(C`l\*(C''' for increasing the level by 1.
Control the display type: "\*(C`short\*(C'\*(L" for a short version display, \*(R"\*(C`long\*(C'\*(L" for a longer version display, \*(R"\*(C`hex\*(C'\*(L" for a hexadecimal display of the version and \*(R"\*(C`libtool\*(C'" for a format suitable for use with \s-1GNU\s0 libtool.
# shell script shtool version -l c -n FooBar -p foobar -s 1.2b3 version.c # configure.in V=`shtool version -l c -d long version.c` echo "Configuring FooBar, Version $V"
The \s-1GNU\s0 shtool version command was originally written by Ralf S. Engelschall <[email protected]> in 1994 for \s-1OSSP\s0 eperl. It was later rewritten from scratch for inclusion into \s-1GNU\s0 shtool.
shtool\|(1).