SHTOOL-VERSION.TMP(1)
π SHTOOL-VERSION π
okay bestie, gather round, because this is the shtool-version page from the GNU Portable Shell Tool and it's literally the little gremlin that keeps your version numbers from going feral. it lives in the GNU shtool manual, section 1. no cap. π¦
β¨ NAME β¨
shtool-version β the GNU shtool command that maintains your version information file. she's giving librarian energy, but for numbers. π
πΈ SYNOPSIS πΈ
shtool version [-l|--language lang] [-n|--name name] [-p|--prefix
prefix] [-s|--set version] [-e|--edit] [-i|--increase knob]
[-d|--display type] file
π DESCRIPTION π
so like, this command displays and maintains version information inside file. that's the whole job. she's focused. she's employed. she's thriving. π
the version is always described as a triple <version,revision,level> and it's represented by a string that always matches the regular expression [0-9]+\.[0-9]+[sabp.][0-9]+. yes bestie, the pattern is the law. π
now for the nerdy part (affectionate): the hexadecimal format for a version v.rtl is VVRRTLL where
VVandRRdirectly correspond tovandrπ«ΆTencodes the level type as9,2,1,0(representings,p/.,b,ain this order)LLis either directly corresponding tol, or set to99if the level type iss
likeβ¦ it's giving encoding. it's giving bit-shuffling. iconic behavior honestly. β
β¨ OPTIONS β¨
the following command line options are available, mwah:
-v,--verboseβ print verbose information during processing. she will tell you everything. oversharing as a service. π£οΈ-l,--languagelang β choose the format of the version file file. your options arelang="txt", ANSI C (lang="c"), M4 (lang="m4"), Perl (lang="perl") or Python (lang="python"). default is"txt". pick your fighter. π-n,--namename β name the program that the version is being maintained for. default is"unknown". bestie we can do better thanunknown, please name your child. π-p,--prefixprefix β (the page lowkey doesn't spell this one out, so we're just passing along the flag exactly as it's written, no guessing π)-s,--setversion β set the version to version. just. straight up. assignment. periodt. π-e,--editβ interactively enter a new version. it will literally ask you. conversation-style. π€-i,--increaseknob β when option-iis used, the current version in file is updated by increasing one element of the version, where knob can be one of the following:"v"for increasing the version by 1 (and resetting revision and level to 0)"r"for increasing the revision by 1 (and resetting level to 0)"l"for increasing the level by 1
-d,--displaytype β control the display type:"short"for a short version display,"long"for a longer version display,"hex"for a hexadecimal display of the version, and"libtool"for a format suitable for use with GNU libtool. choose your aesthetic. π¨
π EXAMPLE π
here's how the girlies actually use her:
# 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"
ate. no crumbs. π₯
π¦ HISTORY π¦
the GNU shtool version command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1994 for OSSP eperl. it was later rewritten from scratch for inclusion into GNU shtool. glow-up of the century, fr fr. β¨
π SEE ALSO π
π heads up bestie: those are all the flags, don't go inventing new ones, the page said what it said.
and that's the whole vibe check! this page is from shtool 2.0.8, dated 18-Jul-2008 β yeah she's a vintage queen and she still serves ππ bye ily, go bump your version numbers responsibly ππ«Ά
π¦ where this page comes from
- debian bookworm: shtool 2.0.8-10 Β· GPL-2.0-or-later
- debian trixie: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu jammy: shtool 2.0.8-10 Β· GPL-2.0-or-later
- ubuntu noble: shtool 2.0.8-10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms